]> gitweb.factorcode.org Git - factor.git/blob - basis/io/directories/unix/linux/linux.factor
Move <ref>, deref and little-endian? from alien.c-types to alien.data, remove <c...
[factor.git] / basis / io / directories / unix / linux / linux.factor
1 ! Copyright (C) 2009 Doug Coleman.
2 ! See http://factorcode.org/license.txt for BSD license.
3 USING: alien.c-types alien.data io.directories.unix kernel
4 system unix classes.struct unix.ffi ;
5 IN: io.directories.unix.linux
6
7 M: linux find-next-file ( DIR* -- dirent )
8     dirent <struct>
9     f void* <ref>
10     [ [ readdir64_r ] unix-system-call 0 = [ (io-error) ] unless ] 2keep
11     void* deref [ drop f ] unless ;