diff --git a/basis/io/unix/files/files.factor b/basis/io/unix/files/files.factor index 07ef0e2574..de95a3a583 100644 --- a/basis/io/unix/files/files.factor +++ b/basis/io/unix/files/files.factor @@ -6,7 +6,7 @@ math.bitwise byte-arrays alien combinators calendar io.encodings.binary accessors sequences strings system io.files.private destructors vocabs.loader calendar.unix unix.stat alien.c-types arrays unix.users unix.groups -environment fry io.encodings.utf8 alien.strings unix.statfs +environment fry io.encodings.utf8 alien.strings combinators.short-circuit ; IN: io.unix.files @@ -76,15 +76,64 @@ M: unix copy-file ( from to -- ) [ swap file-info permissions>> chmod io-error ] 2bi ; -HOOK: stat>file-info os ( stat -- file-info ) +TUPLE: unix-file-system-info < file-system-info +block-size preferred-block-size +blocks blocks-free blocks-available +files files-free files-available +name-max flags id ; -HOOK: stat>type os ( stat -- file-info ) +HOOK: new-file-system-info os ( -- file-system-info ) -HOOK: new-file-info os ( -- class ) +M: unix new-file-system-info ( -- ) unix-file-system-info new ; + +HOOK: file-system-statfs os ( path -- statfs ) + +M: unix file-system-statfs drop f ; + +HOOK: file-system-statvfs os ( path -- statvfs ) + +M: unix file-system-statvfs drop f ; + +HOOK: statfs>file-system-info os ( file-system-info statfs -- file-system-info' ) + +M: unix statfs>file-system-info drop ; + +HOOK: statvfs>file-system-info os ( file-system-info statvfs -- file-system-info' ) + +M: unix statvfs>file-system-info drop ; + +: file-system-calculations ( file-system-info -- file-system-info' ) + { + [ dup [ blocks-available>> ] [ block-size>> ] bi * >>free-space drop ] + [ dup [ blocks>> ] [ block-size>> ] bi * >>total-space drop ] + [ dup [ total-space>> ] [ free-space>> ] bi - >>used-space drop ] + [ ] + } cleave ; + +M: unix file-system-info + normalize-path + [ new-file-system-info ] dip + [ file-system-statfs statfs>file-system-info ] + [ file-system-statvfs statvfs>file-system-info ] bi + file-system-calculations ; + +os { + { linux [ "io.unix.files.linux" require ] } + { macosx [ "io.unix.files.macosx" require ] } + { freebsd [ "io.unix.files.freebsd" require ] } + { netbsd [ "io.unix.files.netbsd" require ] } + { openbsd [ "io.unix.files.openbsd" require ] } +} case TUPLE: unix-file-info < file-info uid gid dev ino nlink rdev blocks blocksize ; +HOOK: new-file-info os ( -- file-info ) + +HOOK: stat>file-info os ( stat -- file-info ) + +HOOK: stat>type os ( stat -- file-info ) + M: unix file-info ( path -- info ) normalize-path file-status stat>file-info ; diff --git a/basis/io/unix/files/freebsd/freebsd.factor b/basis/io/unix/files/freebsd/freebsd.factor new file mode 100644 index 0000000000..16ef9f61d2 --- /dev/null +++ b/basis/io/unix/files/freebsd/freebsd.factor @@ -0,0 +1,24 @@ +! Copyright (C) 2008 Doug Coleman. +! See http://factorcode.org/license.txt for BSD license. +USING: accessors alien.c-types alien.syntax combinators +io.backend io.files io.unix.files kernel math system unix +unix.statfs unix.statvfs.freebsd ; +IN: io.unix.files.freebsd + +M: freebsd file-system-statvfs ( path -- byte-array ) + "statvfs" tuck statvfs io-error ; + +M: freebsd statvfs>file-system-info ( file-system-info statvfs -- file-system-info ) + { + [ statvfs-f_bavail >>blocks-available ] + [ statvfs-f_bfree >>blocks-free ] + [ statvfs-f_blocks >>blocks ] + [ statvfs-f_favail >>files-available ] + [ statvfs-f_ffree >>files-free ] + [ statvfs-f_files >>files ] + [ statvfs-f_bsize >>block-size ] + [ statvfs-f_flag >>flags ] + [ statvfs-f_frsize >>preferred-block-size ] + [ statvfs-f_fsid >>id ] + [ statvfs-f_namemax >>name-max ] + } cleave ; diff --git a/basis/unix/statfs/linux/32/tags.txt b/basis/io/unix/files/freebsd/tags.txt similarity index 100% rename from basis/unix/statfs/linux/32/tags.txt rename to basis/io/unix/files/freebsd/tags.txt diff --git a/basis/io/unix/files/linux/linux.factor b/basis/io/unix/files/linux/linux.factor new file mode 100644 index 0000000000..dd9abcbd1e --- /dev/null +++ b/basis/io/unix/files/linux/linux.factor @@ -0,0 +1,70 @@ +! Copyright (C) 2008 Doug Coleman. +! See http://factorcode.org/license.txt for BSD license. +USING: accessors alien.c-types alien.syntax combinators csv +io.encodings.utf8 io.files io.streams.string io.unix.files +kernel namespaces sequences system unix unix.statfs.linux +unix.statvfs.linux ; +IN: io.unix.files.linux + +TUPLE: linux-file-system-info < unix-file-system-info +namelen spare ; + +M: linux new-file-system-info linux-file-system-info new ; + +M: linux file-system-statfs ( path -- byte-array ) + "statfs64" tuck statfs64 io-error ; + +M: linux statfs>file-system-info ( struct -- statfs ) + { + [ statfs64-f_type >>type ] + [ statfs64-f_bsize >>block-size ] + [ statfs64-f_blocks >>blocks ] + [ statfs64-f_bfree >>blocks-free ] + [ statfs64-f_bavail >>blocks-available ] + [ statfs64-f_files >>files ] + [ statfs64-f_ffree >>files-free ] + [ statfs64-f_fsid >>id ] + [ statfs64-f_namelen >>namelen ] + [ statfs64-f_frsize >>preferred-block-size ] + [ statfs64-f_spare >>spare ] + } cleave ; + +M: linux file-system-statvfs ( path -- byte-array ) + "statvfs64" tuck statvfs64 io-error ; + +M: linux statvfs>file-system-info ( struct -- statfs ) + { + [ statvfs64-f_flag >>flags ] + [ statvfs64-f_namemax >>name-max ] + } cleave ; + +TUPLE: mtab-entry file-system-name mount-point type options +frequency pass-number ; + +: mtab-csv>mtab-entry ( csv -- mtab-entry ) + [ mtab-entry new ] dip + { + [ first >>file-system-name ] + [ second >>mount-point ] + [ third >>type ] + [ fourth csv first >>options ] + [ 4 swap nth >>frequency ] + [ 5 swap nth >>pass-number ] + } cleave ; + +: parse-mtab ( -- array ) + [ + "/etc/mtab" utf8 + CHAR: \s delimiter set csv + ] with-scope + [ mtab-csv>mtab-entry ] map ; + +M: linux file-systems + parse-mtab [ + [ mount-point>> file-system-info ] keep + { + [ file-system-name>> >>device-name ] + [ mount-point>> >>mount-point ] + [ type>> >>type ] + } cleave + ] map ; diff --git a/basis/unix/statfs/linux/64/tags.txt b/basis/io/unix/files/linux/tags.txt similarity index 100% rename from basis/unix/statfs/linux/64/tags.txt rename to basis/io/unix/files/linux/tags.txt diff --git a/basis/io/unix/files/macosx/macosx.factor b/basis/io/unix/files/macosx/macosx.factor new file mode 100644 index 0000000000..c5d12a012e --- /dev/null +++ b/basis/io/unix/files/macosx/macosx.factor @@ -0,0 +1,50 @@ +! Copyright (C) 2008 Doug Coleman. +! See http://factorcode.org/license.txt for BSD license. +USING: accessors alien.c-types alien.strings combinators +grouping io.encodings.utf8 io.files kernel math sequences +system unix unix.statfs.macosx io.unix.files unix.statvfs.macosx ; +IN: io.unix.files.macosx + +TUPLE: macosx-file-system-info < unix-file-system-info +io-size owner type-id filesystem-subtype ; + +M: macosx file-systems ( -- array ) + f dup 0 getmntinfo64 dup io-error + [ *void* ] dip + "statfs64" heap-size [ * memory>byte-array ] keep group + [ [ new-file-system-info ] dip statfs>file-system-info ] map ; + +M: macosx new-file-system-info macosx-file-system-info new ; + +M: macosx file-system-statfs ( normalized-path -- statfs ) + "statfs64" tuck statfs64 io-error ; + +M: macosx file-system-statvfs ( normalized-path -- statvfs ) + "statvfs" tuck statvfs io-error ; + +M: macosx statfs>file-system-info ( file-system-info byte-array -- file-system-info' ) + { + [ statfs64-f_bsize >>block-size ] + [ statfs64-f_iosize >>io-size ] + [ statfs64-f_blocks >>blocks ] + [ statfs64-f_bfree >>blocks-free ] + [ statfs64-f_bavail >>blocks-available ] + [ statfs64-f_files >>files ] + [ statfs64-f_ffree >>files-free ] + [ statfs64-f_fsid >>id ] + [ statfs64-f_owner >>owner ] + [ statfs64-f_type >>type-id ] + [ statfs64-f_flags >>flags ] + [ statfs64-f_fssubtype >>filesystem-subtype ] + [ statfs64-f_fstypename utf8 alien>string >>type ] + [ statfs64-f_mntonname utf8 alien>string >>mount-point ] + [ statfs64-f_mntfromname utf8 alien>string >>device-name ] + } cleave ; + +M: macosx statvfs>file-system-info ( file-system-info byte-array -- file-system-info' ) + { + [ statvfs-f_frsize >>preferred-block-size ] + [ statvfs-f_favail >>files-available ] + [ statvfs-f_namemax >>name-max ] + } cleave ; + diff --git a/basis/unix/statfs/openbsd/32/tags.txt b/basis/io/unix/files/macosx/tags.txt similarity index 100% rename from basis/unix/statfs/openbsd/32/tags.txt rename to basis/io/unix/files/macosx/tags.txt diff --git a/basis/io/unix/files/netbsd/netbsd.factor b/basis/io/unix/files/netbsd/netbsd.factor new file mode 100644 index 0000000000..1bd8ba4f67 --- /dev/null +++ b/basis/io/unix/files/netbsd/netbsd.factor @@ -0,0 +1,49 @@ +! Copyright (C) 2008 Doug Coleman. +! See http://factorcode.org/license.txt for BSD license. +USING: alien.syntax kernel unix.stat math unix +combinators system io.backend accessors alien.c-types +io.encodings.utf8 alien.strings unix.types unix.statfs +io.unix.files io.files unix.statvfs.netbsd ; +IN: io.unix.files.netbsd + +TUPLE: netbsd-file-system-info < unix-file-system-info +blocks-reserved files-reserved +owner io-size +sync-reads sync-writes +async-reads async-writes +idx mount-from spare ; + +M: netbsd new-file-system-info netbsd-file-system-info new ; + +M: netbsd file-system-statvfs + "statvfs" tuck statvfs io-error ; + +M: netbsd statvfs>file-system-info ( file-system-info statvfs -- file-system-info' ) + { + [ statvfs-f_flag >>flags ] + [ statvfs-f_bsize >>block-size ] + [ statvfs-f_frsize >>preferred-block-size ] + [ statvfs-f_iosize >>io-size ] + [ statvfs-f_blocks >>blocks ] + [ statvfs-f_bfree >>blocks-free ] + [ statvfs-f_bavail >>blocks-available ] + [ statvfs-f_bresvd >>blocks-reserved ] + [ statvfs-f_files >>files ] + [ statvfs-f_ffree >>files-free ] + [ statvfs-f_favail >>files-available ] + [ statvfs-f_fresvd >>files-reserved ] + [ statvfs-f_syncreads >>sync-reads ] + [ statvfs-f_syncwrites >>sync-writes ] + [ statvfs-f_asyncreads >>async-reads ] + [ statvfs-f_asyncwrites >>async-writes ] + [ statvfs-f_fsidx >>idx ] + [ statvfs-f_fsid >>id ] + [ statvfs-f_namemax >>name-max ] + [ statvfs-f_owner >>owner ] + [ statvfs-f_spare >>spare ] + [ statvfs-f_fstypename alien>native-string >>type ] + [ statvfs-f_mntonname alien>native-string >>mount-point ] + [ statvfs-f_mntfromname alien>native-string >>device-name ] + } cleave ; + +FUNCTION: int statvfs ( char* path, statvfs* buf ) ; diff --git a/basis/unix/statfs/openbsd/64/tags.txt b/basis/io/unix/files/netbsd/tags.txt similarity index 100% rename from basis/unix/statfs/openbsd/64/tags.txt rename to basis/io/unix/files/netbsd/tags.txt diff --git a/basis/io/unix/files/openbsd/openbsd.factor b/basis/io/unix/files/openbsd/openbsd.factor new file mode 100644 index 0000000000..68f2e62f40 --- /dev/null +++ b/basis/io/unix/files/openbsd/openbsd.factor @@ -0,0 +1,24 @@ +! Copyright (C) 2008 Doug Coleman. +! See http://factorcode.org/license.txt for BSD license. +USING: alien.syntax accessors combinators kernel +unix.types math system io.backend alien.c-types unix +io.files io.unix.files unix.statvfs.openbsd ; +IN: io.unix.files.openbsd + +M: openbsd file-system-statvfs ( normalized-path -- statvfs ) + "statvfs" tuck statvfs io-error ; + +M: openbsd statvfs>file-system-info ( file-system-info statvfs -- file-system-info' ) + { + [ statvfs-f_bsize >>block-size ] + [ statvfs-f_frsize >>preferred-block-size ] + [ statvfs-f_blocks >>blocks ] + [ statvfs-f_bfree >>blocks-free ] + [ statvfs-f_bavail >>blocks-available ] + [ statvfs-f_files >>files ] + [ statvfs-f_ffree >>files-free ] + [ statvfs-f_favail >>files-available ] + [ statvfs-f_fsid >>id ] + [ statvfs-f_flag >>flags ] + [ statvfs-f_namemax >>name-max ] + } cleave ; diff --git a/basis/unix/statfs/openbsd/tags.txt b/basis/io/unix/files/openbsd/tags.txt similarity index 100% rename from basis/unix/statfs/openbsd/tags.txt rename to basis/io/unix/files/openbsd/tags.txt diff --git a/basis/io/windows/files/files.factor b/basis/io/windows/files/files.factor index 7f84b9d9e5..4c38ee3b12 100755 --- a/basis/io/windows/files/files.factor +++ b/basis/io/windows/files/files.factor @@ -257,9 +257,6 @@ M: winnt link-info ( path -- info ) HOOK: root-directory os ( string -- string' ) -TUPLE: winnt-file-system-info < file-system-info -total-bytes total-free-bytes ; - : file-system-type ( normalized-path -- str ) MAX_PATH 1+ MAX_PATH 1+ @@ -269,21 +266,28 @@ total-bytes total-free-bytes ; [ GetVolumeInformation win32-error=0/f ] 2keep drop utf16n alien>string ; -: file-system-space ( normalized-path -- free-space total-bytes total-free-bytes ) +: file-system-space ( normalized-path -- available-space total-space free-space ) "ULARGE_INTEGER" "ULARGE_INTEGER" "ULARGE_INTEGER" [ GetDiskFreeSpaceEx win32-error=0/f ] 3keep ; +: calculate-file-system-info ( file-system-info -- file-system-info' ) + { + [ dup [ total-space>> ] [ free-space>> ] bi - >>used-space drop ] + [ ] + } cleave ; + M: winnt file-system-info ( path -- file-system-info ) normalize-path root-directory dup [ file-system-type ] [ file-system-space ] bi - \ winnt-file-system-info new - swap *ulonglong >>total-free-bytes - swap *ulonglong >>total-bytes + \ file-system-info new swap *ulonglong >>free-space + swap *ulonglong >>total-space + swap *ulonglong >>available-space swap >>type - swap >>mount-point ; + swap >>mount-point + calculate-file-system-info ; : volume>paths ( string -- array ) 16384 "ushort" tuck dup length @@ -324,7 +328,7 @@ M: winnt file-systems ( -- array ) find-volumes [ volume>paths ] map concat [ [ file-system-info ] - [ drop winnt-file-system-info new swap >>mount-point ] recover + [ drop \ file-system-info new swap >>mount-point ] recover ] map ; : file-times ( path -- timestamp timestamp timestamp ) diff --git a/basis/unix/statfs/freebsd/freebsd.factor b/basis/unix/statfs/freebsd/freebsd.factor index b6179a4ad7..5496bbe1ba 100644 --- a/basis/unix/statfs/freebsd/freebsd.factor +++ b/basis/unix/statfs/freebsd/freebsd.factor @@ -22,32 +22,3 @@ C-STRUCT: statvfs { "ulong" "f_namemax" } ; FUNCTION: int statvfs ( char* path, statvfs* buf ) ; - -TUPLE: freebsd-file-system-info < file-system-info -bavail bfree blocks favail ffree files -bsize flag frsize fsid namemax ; - -M: freebsd >file-system-info ( struct -- statfs ) - [ \ freebsd-file-system-info new ] dip - { - [ - [ statvfs-f_bsize ] - [ statvfs-f_bavail ] bi * >>free-space - ] - [ statvfs-f_bavail >>bavail ] - [ statvfs-f_bfree >>bfree ] - [ statvfs-f_blocks >>blocks ] - [ statvfs-f_favail >>favail ] - [ statvfs-f_ffree >>ffree ] - [ statvfs-f_files >>files ] - [ statvfs-f_bsize >>bsize ] - [ statvfs-f_flag >>flag ] - [ statvfs-f_frsize >>frsize ] - [ statvfs-f_fsid >>fsid ] - [ statvfs-f_namemax >>namemax ] - } cleave ; - -M: freebsd file-system-info ( path -- byte-array ) - normalize-path - "statvfs" tuck statvfs io-error - >file-system-info ; diff --git a/basis/unix/statfs/linux/32/32.factor b/basis/unix/statfs/linux/32/32.factor deleted file mode 100644 index fb8c6b5035..0000000000 --- a/basis/unix/statfs/linux/32/32.factor +++ /dev/null @@ -1,46 +0,0 @@ -! Copyright (C) 2008 Doug Coleman. -! See http://factorcode.org/license.txt for BSD license. -USING: alien.c-types combinators kernel unix.stat -math accessors system unix io.backend layouts vocabs.loader -alien.syntax unix.statfs io.files ; -IN: unix.statfs.linux - -C-STRUCT: statfs - { "long" "f_type" } - { "long" "f_bsize" } - { "long" "f_blocks" } - { "long" "f_bfree" } - { "long" "f_bavail" } - { "long" "f_files" } - { "long" "f_ffree" } - { "fsid_t" "f_fsid" } - { "long" "f_namelen" } ; - -FUNCTION: int statfs ( char* path, statfs* buf ) ; - -TUPLE: linux32-file-system-info < file-system-info -bsize blocks bfree bavail files ffree fsid namelen -frsize spare ; - -M: linux >file-system-info ( struct -- statfs ) - [ \ linux32-file-system-info new ] dip - { - [ - [ statfs-f_bsize ] - [ statfs-f_bavail ] bi * >>free-space - ] - [ statfs-f_type >>type ] - [ statfs-f_bsize >>bsize ] - [ statfs-f_blocks >>blocks ] - [ statfs-f_bfree >>bfree ] - [ statfs-f_bavail >>bavail ] - [ statfs-f_files >>files ] - [ statfs-f_ffree >>ffree ] - [ statfs-f_fsid >>fsid ] - [ statfs-f_namelen >>namelen ] - } cleave ; - -M: linux file-system-info ( path -- byte-array ) - normalize-path - "statfs" tuck statfs io-error - >file-system-info ; diff --git a/basis/unix/statfs/linux/32/authors.txt b/basis/unix/statfs/linux/32/authors.txt deleted file mode 100644 index b4bd0e7b35..0000000000 --- a/basis/unix/statfs/linux/32/authors.txt +++ /dev/null @@ -1 +0,0 @@ -Doug Coleman \ No newline at end of file diff --git a/basis/unix/statfs/linux/64/64.factor b/basis/unix/statfs/linux/64/64.factor deleted file mode 100644 index e9cd5576aa..0000000000 --- a/basis/unix/statfs/linux/64/64.factor +++ /dev/null @@ -1,50 +0,0 @@ -! Copyright (C) 2008 Doug Coleman. -! See http://factorcode.org/license.txt for BSD license. -USING: alien.c-types combinators kernel unix.stat -math accessors system unix io.backend layouts vocabs.loader -alien.syntax unix.statfs io.files ; -IN: unix.statfs.linux - -C-STRUCT: statfs64 - { "__SWORD_TYPE" "f_type" } - { "__SWORD_TYPE" "f_bsize" } - { "__fsblkcnt64_t" "f_blocks" } - { "__fsblkcnt64_t" "f_bfree" } - { "__fsblkcnt64_t" "f_bavail" } - { "__fsfilcnt64_t" "f_files" } - { "__fsfilcnt64_t" "f_ffree" } - { "__fsid_t" "f_fsid" } - { "__SWORD_TYPE" "f_namelen" } - { "__SWORD_TYPE" "f_frsize" } - { { "__SWORD_TYPE" 5 } "f_spare" } ; - -FUNCTION: int statfs64 ( char* path, statfs64* buf ) ; - -TUPLE: linux64-file-system-info < file-system-info -bsize blocks bfree bavail files ffree fsid namelen -frsize spare ; - -M: linux >file-system-info ( struct -- statfs ) - [ \ linux64-file-system-info new ] dip - { - [ - [ statfs64-f_bsize ] - [ statfs64-f_bavail ] bi * >>free-space - ] - [ statfs64-f_type >>type ] - [ statfs64-f_bsize >>bsize ] - [ statfs64-f_blocks >>blocks ] - [ statfs64-f_bfree >>bfree ] - [ statfs64-f_bavail >>bavail ] - [ statfs64-f_files >>files ] - [ statfs64-f_ffree >>ffree ] - [ statfs64-f_fsid >>fsid ] - [ statfs64-f_namelen >>namelen ] - [ statfs64-f_frsize >>frsize ] - [ statfs64-f_spare >>spare ] - } cleave ; - -M: linux file-system-info ( path -- byte-array ) - normalize-path - "statfs64" tuck statfs64 io-error - >file-system-info ; diff --git a/basis/unix/statfs/linux/64/authors.txt b/basis/unix/statfs/linux/64/authors.txt deleted file mode 100644 index b4bd0e7b35..0000000000 --- a/basis/unix/statfs/linux/64/authors.txt +++ /dev/null @@ -1 +0,0 @@ -Doug Coleman \ No newline at end of file diff --git a/basis/unix/statfs/linux/linux.factor b/basis/unix/statfs/linux/linux.factor index 43d5a99cd1..6550ee572e 100644 --- a/basis/unix/statfs/linux/linux.factor +++ b/basis/unix/statfs/linux/linux.factor @@ -1,43 +1,19 @@ ! Copyright (C) 2008 Doug Coleman. ! See http://factorcode.org/license.txt for BSD license. -USING: alien.c-types combinators kernel unix.stat -math accessors system unix io.backend layouts vocabs.loader -sequences csv io.streams.string io.encodings.utf8 namespaces -unix.statfs io.files ; +USING: alien.syntax ; IN: unix.statfs.linux -cell-bits { - { 32 [ "unix.statfs.linux.32" require ] } - { 64 [ "unix.statfs.linux.64" require ] } -} case +C-STRUCT: statfs64 + { "__SWORD_TYPE" "f_type" } + { "__SWORD_TYPE" "f_bsize" } + { "__fsblkcnt64_t" "f_blocks" } + { "__fsblkcnt64_t" "f_bfree" } + { "__fsblkcnt64_t" "f_bavail" } + { "__fsfilcnt64_t" "f_files" } + { "__fsfilcnt64_t" "f_ffree" } + { "__fsid_t" "f_fsid" } + { "__SWORD_TYPE" "f_namelen" } + { "__SWORD_TYPE" "f_frsize" } + { { "__SWORD_TYPE" 5 } "f_spare" } ; -TUPLE: mtab-entry file-system-name mount-point type options -frequency pass-number ; - -: mtab-csv>mtab-entry ( csv -- mtab-entry ) - [ mtab-entry new ] dip - { - [ first >>file-system-name ] - [ second >>mount-point ] - [ third >>type ] - [ fourth csv first >>options ] - [ 4 swap nth >>frequency ] - [ 5 swap nth >>pass-number ] - } cleave ; - -: parse-mtab ( -- array ) - [ - "/etc/mtab" utf8 - CHAR: \s delimiter set csv - ] with-scope - [ mtab-csv>mtab-entry ] map ; - -M: linux file-systems - parse-mtab [ - [ mount-point>> file-system-info ] keep - { - [ file-system-name>> >>device-name ] - [ mount-point>> >>mount-point ] - [ type>> >>type ] - } cleave - ] map ; +FUNCTION: int statfs64 ( char* path, statfs64* buf ) ; diff --git a/basis/unix/statfs/macosx/macosx.factor b/basis/unix/statfs/macosx/macosx.factor index 7c30c4b9d4..fcdbb1ee87 100644 --- a/basis/unix/statfs/macosx/macosx.factor +++ b/basis/unix/statfs/macosx/macosx.factor @@ -3,7 +3,7 @@ USING: alien.c-types io.encodings.utf8 io.encodings.string kernel sequences unix.stat accessors unix combinators math grouping system unix.statfs io.files io.backend alien.strings -math.bitwise alien.syntax ; +math.bitwise alien.syntax io.unix.files ; IN: unix.statfs.macosx : MNT_RDONLY HEX: 00000001 ; inline @@ -116,50 +116,3 @@ C-STRUCT: statfs64 FUNCTION: int statfs64 ( char* path, statfs64* buf ) ; FUNCTION: int getmntinfo64 ( statfs64** mntbufp, int flags ) ; - - -TUPLE: macosx-file-system-info < file-system-info -block-size io-size blocks blocks-free blocks-available files -files-free file-system-id owner type-id flags filesystem-subtype ; - -M: macosx file-systems ( -- array ) - f dup 0 getmntinfo64 dup io-error - [ *void* ] dip - "statfs64" heap-size [ * memory>byte-array ] keep group - [ >file-system-info ] map ; - -M: macosx >file-system-info ( byte-array -- file-system-info ) - [ \ macosx-file-system-info new ] dip - { - [ - [ statfs64-f_bavail ] [ statfs64-f_bsize ] bi * - >>free-space - ] - [ statfs64-f_mntonname utf8 alien>string >>mount-point ] - [ statfs64-f_bsize >>block-size ] - - [ statfs64-f_iosize >>io-size ] - [ statfs64-f_blocks >>blocks ] - [ statfs64-f_bfree >>blocks-free ] - [ statfs64-f_bavail >>blocks-available ] - [ statfs64-f_files >>files ] - [ statfs64-f_ffree >>files-free ] - [ statfs64-f_fsid >>file-system-id ] - [ statfs64-f_owner >>owner ] - [ statfs64-f_type >>type-id ] - [ statfs64-f_flags >>flags ] - [ statfs64-f_fssubtype >>filesystem-subtype ] - [ - statfs64-f_fstypename utf8 alien>string - >>type - ] - [ - statfs64-f_mntfromname - utf8 alien>string >>device-name - ] - } cleave ; - -M: macosx file-system-info ( path -- file-system-info ) - normalize-path - "statfs64" tuck statfs64 io-error - >file-system-info ; diff --git a/basis/unix/statfs/netbsd/netbsd.factor b/basis/unix/statfs/netbsd/netbsd.factor index d8a4bdc138..5617ca7533 100644 --- a/basis/unix/statfs/netbsd/netbsd.factor +++ b/basis/unix/statfs/netbsd/netbsd.factor @@ -4,75 +4,3 @@ USING: alien.syntax kernel unix.stat math unix combinators system io.backend accessors alien.c-types io.encodings.utf8 alien.strings unix.types unix.statfs io.files ; IN: unix.statfs.netbsd - -: _VFS_NAMELEN 32 ; inline -: _VFS_MNAMELEN 1024 ; inline - -C-STRUCT: statvfs - { "ulong" "f_flag" } - { "ulong" "f_bsize" } - { "ulong" "f_frsize" } - { "ulong" "f_iosize" } - { "fsblkcnt_t" "f_blocks" } - { "fsblkcnt_t" "f_bfree" } - { "fsblkcnt_t" "f_bavail" } - { "fsblkcnt_t" "f_bresvd" } - { "fsfilcnt_t" "f_files" } - { "fsfilcnt_t" "f_ffree" } - { "fsfilcnt_t" "f_favail" } - { "fsfilcnt_t" "f_fresvd" } - { "uint64_t" "f_syncreads" } - { "uint64_t" "f_syncwrites" } - { "uint64_t" "f_asyncreads" } - { "uint64_t" "f_asyncwrites" } - { "fsid_t" "f_fsidx" } - { "ulong" "f_fsid" } - { "ulong" "f_namemax" } - { "uid_t" "f_owner" } - { { "uint32_t" 4 } "f_spare" } - { { "char" _VFS_NAMELEN } "f_fstypename" } - { { "char" _VFS_MNAMELEN } "f_mntonname" } - { { "char" _VFS_MNAMELEN } "f_mntfromname" } ; - -FUNCTION: int statvfs ( char* path, statvfs* buf ) ; - -TUPLE: netbsd-file-system-info < file-system-info -flag bsize frsize io-size -blocks blocks-free blocks-available blocks-reserved -files ffree sync-reads sync-writes async-reads async-writes -fsidx fsid namemax owner spare fstype mnotonname mntfromname -file-system-type-name mount-from ; - -M: netbsd >file-system-info ( byte-array -- netbsd-file-system-info ) - [ \ netbsd-file-system-info new ] dip - { - [ - [ statvfs-f_bsize ] - [ statvfs-f_bavail ] bi * >>free-space - ] - [ statvfs-f_flag >>flag ] - [ statvfs-f_bsize >>bsize ] - [ statvfs-f_frsize >>frsize ] - [ statvfs-f_iosize >>io-size ] - [ statvfs-f_blocks >>blocks ] - [ statvfs-f_bfree >>blocks-free ] - [ statvfs-f_favail >>blocks-available ] - [ statvfs-f_fresvd >>blocks-reserved ] - [ statvfs-f_files >>files ] - [ statvfs-f_ffree >>ffree ] - [ statvfs-f_syncreads >>sync-reads ] - [ statvfs-f_syncwrites >>sync-writes ] - [ statvfs-f_asyncreads >>async-reads ] - [ statvfs-f_asyncwrites >>async-writes ] - [ statvfs-f_fsidx >>fsidx ] - [ statvfs-f_namemax >>namemax ] - [ statvfs-f_owner >>owner ] - [ statvfs-f_spare >>spare ] - [ statvfs-f_fstypename utf8 alien>string >>file-system-type-name ] - [ statvfs-f_mntonname utf8 alien>string >>mount-point ] - [ statvfs-f_mntfromname utf8 alien>string >>mount-from ] - } cleave ; - -M: netbsd file-system-info - normalize-path "statvfs" tuck statvfs io-error - >file-system-info ; diff --git a/basis/unix/statfs/openbsd/32/32.factor b/basis/unix/statfs/openbsd/32/32.factor deleted file mode 100644 index aa1e8425dc..0000000000 --- a/basis/unix/statfs/openbsd/32/32.factor +++ /dev/null @@ -1,26 +0,0 @@ -! Copyright (C) 2008 Doug Coleman. -! See http://factorcode.org/license.txt for BSD license. -USING: alien.syntax kernel unix ; -IN: unix.statfs.openbsd.32 - -: MFSNAMELEN 16 ; inline -: MNAMELEN 90 ; inline - -C-STRUCT: statfs - { "u_int32_t" "f_flags" } - { "int32_t" "f_bsize" } - { "u_int32_t" "f_iosize" } - { "u_int32_t" "f_blocks" } - { "u_int32_t" "f_bfree" } - { "int32_t" "f_bavail" } - { "u_int32_t" "f_files" } - { "u_int32_t" "f_ffree" } - { "fsid_t" "f_fsid" } - { "uid_t" "f_owner" } - { "u_int32_t" "f_syncwrites" } - { "u_int32_t" "f_asyncwrites" } - { "u_int32_t" "f_ctime" } - { { "u_int32_t" 3 } "f_spare" } - { { "char" MFSNAMELEN } "f_fstypename" } - { { "char" MNAMELEN } "f_mntonname" } - { { "char" MNAMELEN } "f_mntfromname" } ; diff --git a/basis/unix/statfs/openbsd/32/authors.txt b/basis/unix/statfs/openbsd/32/authors.txt deleted file mode 100644 index b4bd0e7b35..0000000000 --- a/basis/unix/statfs/openbsd/32/authors.txt +++ /dev/null @@ -1 +0,0 @@ -Doug Coleman \ No newline at end of file diff --git a/basis/unix/statfs/openbsd/64/64.factor b/basis/unix/statfs/openbsd/64/64.factor deleted file mode 100644 index fd40fba033..0000000000 --- a/basis/unix/statfs/openbsd/64/64.factor +++ /dev/null @@ -1,32 +0,0 @@ -! Copyright (C) 2008 Doug Coleman. -! See http://factorcode.org/license.txt for BSD license. -USING: alien.syntax unix ; -IN: unix.statfs.openbsd.64 - -: MFSNAMELEN 16 ; inline -: MNAMELEN 90 ; inline - -C-STRUCT: statfss - { "u_int32_t" "f_flags" } - { "u_int32_t" "f_bsize" } - { "u_int32_t" "f_iosize" } - { "u_int64_t" "f_blocks" } - { "u_int64_t" "f_bfree" } - { "int64_t" "f_bavail" } - { "u_int64_t" "f_files" } - { "u_int64_t" "f_ffree" } - { "int64_t" "f_favail" } - { "u_int64_t" "f_syncwrites" } - { "u_int64_t" "f_syncreads" } - { "u_int64_t" "f_asyncwrites" } - { "u_int64_t" "f_asyncreads" } - { "fsid_t" "f_fsid" } - { "u_int32_t" "f_namemax" } - { "uid_t" "f_owner" } - { "u_int32_t" "f_ctime" } - { { "u_int32_t" 3 } " f_spare" } - { { "char" MFSNAMELEN } "f_fstypename" } - { { "char" MNAMELEN } "f_mntonname" } - { { "char" MNAMELEN } "f_mntfromname" } - { { "char" 512 } "mount_info" } ; - ! { "mount_info" "mount_info" } ; diff --git a/basis/unix/statfs/openbsd/64/authors.txt b/basis/unix/statfs/openbsd/64/authors.txt deleted file mode 100644 index b4bd0e7b35..0000000000 --- a/basis/unix/statfs/openbsd/64/authors.txt +++ /dev/null @@ -1 +0,0 @@ -Doug Coleman \ No newline at end of file diff --git a/basis/unix/statfs/openbsd/authors.txt b/basis/unix/statfs/openbsd/authors.txt deleted file mode 100644 index b4bd0e7b35..0000000000 --- a/basis/unix/statfs/openbsd/authors.txt +++ /dev/null @@ -1 +0,0 @@ -Doug Coleman \ No newline at end of file diff --git a/basis/unix/statfs/openbsd/openbsd.factor b/basis/unix/statfs/openbsd/openbsd.factor deleted file mode 100644 index fa86ef2bc2..0000000000 --- a/basis/unix/statfs/openbsd/openbsd.factor +++ /dev/null @@ -1,53 +0,0 @@ -! Copyright (C) 2008 Doug Coleman. -! See http://factorcode.org/license.txt for BSD license. -USING: alien.syntax accessors combinators kernel -unix.types math system io.backend alien.c-types unix -unix.statfs io.files ; -IN: unix.statfs.openbsd - -C-STRUCT: statvfs - { "ulong" "f_bsize" } - { "ulong" "f_frsize" } - { "fsblkcnt_t" "f_blocks" } - { "fsblkcnt_t" "f_bfree" } - { "fsblkcnt_t" "f_bavail" } - { "fsfilcnt_t" "f_files" } - { "fsfilcnt_t" "f_ffree" } - { "fsfilcnt_t" "f_favail" } - { "ulong" "f_fsid" } - { "ulong" "f_flag" } - { "ulong" "f_namemax" } ; - -: ST_RDONLY 1 ; inline -: ST_NOSUID 2 ; inline - -FUNCTION: int statvfs ( char* path, statvfs* buf ) ; - -TUPLE: openbsd-file-system-info < file-system-info -bsize frsize blocks bfree bavail files ffree favail -fsid flag namemax ; - -M: openbsd >file-system-info ( struct -- statfs ) - [ \ openbsd-file-system-info new ] dip - { - [ - [ statvfs-f_bsize ] - [ statvfs-f_bavail ] bi * >>free-space - ] - [ statvfs-f_bsize >>bsize ] - [ statvfs-f_frsize >>frsize ] - [ statvfs-f_blocks >>blocks ] - [ statvfs-f_bfree >>bfree ] - [ statvfs-f_bavail >>bavail ] - [ statvfs-f_files >>files ] - [ statvfs-f_ffree >>ffree ] - [ statvfs-f_favail >>favail ] - [ statvfs-f_fsid >>fsid ] - [ statvfs-f_flag >>flag ] - [ statvfs-f_namemax >>namemax ] - } cleave ; - -M: openbsd file-system-info ( path -- byte-array ) - normalize-path - "statvfs" tuck statvfs io-error - >file-system-info ; diff --git a/basis/unix/statfs/statfs.factor b/basis/unix/statfs/statfs.factor index 0397507fce..bc7b199705 100644 --- a/basis/unix/statfs/statfs.factor +++ b/basis/unix/statfs/statfs.factor @@ -4,8 +4,6 @@ USING: sequences system vocabs.loader combinators accessors kernel math.order sorting ; IN: unix.statfs -HOOK: >file-system-info os ( struct -- statfs ) - os { { linux [ "unix.statfs.linux" require ] } { macosx [ "unix.statfs.macosx" require ] } diff --git a/basis/unix/statvfs/authors.txt b/basis/unix/statvfs/authors.txt new file mode 100644 index 0000000000..7c1b2f2279 --- /dev/null +++ b/basis/unix/statvfs/authors.txt @@ -0,0 +1 @@ +Doug Coleman diff --git a/basis/unix/statvfs/freebsd/authors.txt b/basis/unix/statvfs/freebsd/authors.txt new file mode 100644 index 0000000000..7c1b2f2279 --- /dev/null +++ b/basis/unix/statvfs/freebsd/authors.txt @@ -0,0 +1 @@ +Doug Coleman diff --git a/basis/unix/statvfs/freebsd/freebsd.factor b/basis/unix/statvfs/freebsd/freebsd.factor new file mode 100644 index 0000000000..7d1a6afb61 --- /dev/null +++ b/basis/unix/statvfs/freebsd/freebsd.factor @@ -0,0 +1,23 @@ +! Copyright (C) 2008 Doug Coleman. +! See http://factorcode.org/license.txt for BSD license. +USING: alien.syntax ; +IN: unix.statvfs.freebsd + +C-STRUCT: statvfs + { "fsblkcnt_t" "f_bavail" } + { "fsblkcnt_t" "f_bfree" } + { "fsblkcnt_t" "f_blocks" } + { "fsfilcnt_t" "f_favail" } + { "fsfilcnt_t" "f_ffree" } + { "fsfilcnt_t" "f_files" } + { "ulong" "f_bsize" } + { "ulong" "f_flag" } + { "ulong" "f_frsize" } + { "ulong" "f_fsid" } + { "ulong" "f_namemax" } ; + +! Flags +: ST_RDONLY HEX: 1 ; inline ! Read-only file system +: ST_NOSUID HEX: 2 ; inline ! Does not honor setuid/setgid + +FUNCTION: int statvfs ( char* path, statvfs* buf ) ; diff --git a/basis/unix/statvfs/linux/authors.txt b/basis/unix/statvfs/linux/authors.txt new file mode 100644 index 0000000000..7c1b2f2279 --- /dev/null +++ b/basis/unix/statvfs/linux/authors.txt @@ -0,0 +1 @@ +Doug Coleman diff --git a/basis/unix/statvfs/linux/linux.factor b/basis/unix/statvfs/linux/linux.factor new file mode 100644 index 0000000000..3bfbffa197 --- /dev/null +++ b/basis/unix/statvfs/linux/linux.factor @@ -0,0 +1,31 @@ +! Copyright (C) 2008 Doug Coleman. +! See http://factorcode.org/license.txt for BSD license. +USING: alien.syntax ; +IN: unix.statvfs.linux + +C-STRUCT: statvfs64 + { "ulong" "f_bsize" } + { "ulong" "f_frsize" } + { "__fsblkcnt64_t" "f_blocks" } + { "__fsblkcnt64_t" "f_bfree" } + { "__fsblkcnt64_t" "f_bavail" } + { "__fsfilcnt64_t" "f_files" } + { "__fsfilcnt64_t" "f_ffree" } + { "__fsfilcnt64_t" "f_favail" } + { "ulong" "f_fsid" } + { "ulong" "f_flag" } + { "ulong" "f_namemax" } + { { "int" 6 } "__f_spare" } ; + +FUNCTION: int statvfs64 ( char* path, statvfs64* buf ) ; + +: ST_RDONLY 1 ; inline ! Mount read-only. +: ST_NOSUID 2 ; inline ! Ignore suid and sgid bits. +: ST_NODEV 4 ; inline ! Disallow access to device special files. +: ST_NOEXEC 8 ; inline ! Disallow program execution. +: ST_SYNCHRONOUS 16 ; inline ! Writes are synced at once. +: ST_MANDLOCK 64 ; inline ! Allow mandatory locks on an FS. +: ST_WRITE 128 ; inline ! Write on file/directory/symlink. +: ST_APPEND 256 ; inline ! Append-only file. +: ST_IMMUTABLE 512 ; inline ! Immutable file. +: ST_NOATIME 1024 ; inline ! Do not update access times. diff --git a/basis/unix/statvfs/linux/tags.txt b/basis/unix/statvfs/linux/tags.txt new file mode 100644 index 0000000000..6bf68304bb --- /dev/null +++ b/basis/unix/statvfs/linux/tags.txt @@ -0,0 +1 @@ +unportable diff --git a/basis/unix/statvfs/macosx/authors.txt b/basis/unix/statvfs/macosx/authors.txt new file mode 100644 index 0000000000..7c1b2f2279 --- /dev/null +++ b/basis/unix/statvfs/macosx/authors.txt @@ -0,0 +1 @@ +Doug Coleman diff --git a/basis/unix/statvfs/macosx/macosx.factor b/basis/unix/statvfs/macosx/macosx.factor new file mode 100644 index 0000000000..7078ff9f33 --- /dev/null +++ b/basis/unix/statvfs/macosx/macosx.factor @@ -0,0 +1,23 @@ +! Copyright (C) 2008 Doug Coleman. +! See http://factorcode.org/license.txt for BSD license. +USING: alien.syntax ; +IN: unix.statvfs.macosx + +C-STRUCT: statvfs + { "ulong" "f_bsize" } + { "ulong" "f_frsize" } + { "fsblkcnt_t" "f_blocks" } + { "fsblkcnt_t" "f_bfree" } + { "fsblkcnt_t" "f_bavail" } + { "fsfilcnt_t" "f_files" } + { "fsfilcnt_t" "f_ffree" } + { "fsfilcnt_t" "f_favail" } + { "ulong" "f_fsid" } + { "ulong" "f_flag" } + { "ulong" "f_namemax" } ; + +! Flags +: ST_RDONLY HEX: 1 ; inline ! Read-only file system +: ST_NOSUID HEX: 2 ; inline ! Does not honor setuid/setgid + +FUNCTION: int statvfs ( char* path, statvfs* buf ) ; diff --git a/basis/unix/statvfs/macosx/tags.txt b/basis/unix/statvfs/macosx/tags.txt new file mode 100644 index 0000000000..6bf68304bb --- /dev/null +++ b/basis/unix/statvfs/macosx/tags.txt @@ -0,0 +1 @@ +unportable diff --git a/basis/unix/statvfs/netbsd/authors.txt b/basis/unix/statvfs/netbsd/authors.txt new file mode 100644 index 0000000000..7c1b2f2279 --- /dev/null +++ b/basis/unix/statvfs/netbsd/authors.txt @@ -0,0 +1 @@ +Doug Coleman diff --git a/basis/unix/statvfs/netbsd/netbsd.factor b/basis/unix/statvfs/netbsd/netbsd.factor new file mode 100644 index 0000000000..cf575c74b1 --- /dev/null +++ b/basis/unix/statvfs/netbsd/netbsd.factor @@ -0,0 +1,35 @@ +! Copyright (C) 2008 Doug Coleman. +! See http://factorcode.org/license.txt for BSD license. +USING: alien.syntax ; +IN: unix.statvfs.netbsd + +: _VFS_NAMELEN 32 ; inline +: _VFS_MNAMELEN 1024 ; inline + +C-STRUCT: statvfs + { "ulong" "f_flag" } + { "ulong" "f_bsize" } + { "ulong" "f_frsize" } + { "ulong" "f_iosize" } + { "fsblkcnt_t" "f_blocks" } + { "fsblkcnt_t" "f_bfree" } + { "fsblkcnt_t" "f_bavail" } + { "fsblkcnt_t" "f_bresvd" } + { "fsfilcnt_t" "f_files" } + { "fsfilcnt_t" "f_ffree" } + { "fsfilcnt_t" "f_favail" } + { "fsfilcnt_t" "f_fresvd" } + { "uint64_t" "f_syncreads" } + { "uint64_t" "f_syncwrites" } + { "uint64_t" "f_asyncreads" } + { "uint64_t" "f_asyncwrites" } + { "fsid_t" "f_fsidx" } + { "ulong" "f_fsid" } + { "ulong" "f_namemax" } + { "uid_t" "f_owner" } + { { "uint32_t" 4 } "f_spare" } + { { "char" _VFS_NAMELEN } "f_fstypename" } + { { "char" _VFS_MNAMELEN } "f_mntonname" } + { { "char" _VFS_MNAMELEN } "f_mntfromname" } ; + +FUNCTION: int statvfs ( char* path, statvfs* buf ) ; diff --git a/basis/unix/statvfs/netbsd/tags.txt b/basis/unix/statvfs/netbsd/tags.txt new file mode 100644 index 0000000000..6bf68304bb --- /dev/null +++ b/basis/unix/statvfs/netbsd/tags.txt @@ -0,0 +1 @@ +unportable diff --git a/basis/unix/statvfs/openbsd/authors.txt b/basis/unix/statvfs/openbsd/authors.txt new file mode 100644 index 0000000000..7c1b2f2279 --- /dev/null +++ b/basis/unix/statvfs/openbsd/authors.txt @@ -0,0 +1 @@ +Doug Coleman diff --git a/basis/unix/statvfs/openbsd/openbsd.factor b/basis/unix/statvfs/openbsd/openbsd.factor new file mode 100644 index 0000000000..3f9353f926 --- /dev/null +++ b/basis/unix/statvfs/openbsd/openbsd.factor @@ -0,0 +1,22 @@ +! Copyright (C) 2008 Doug Coleman. +! See http://factorcode.org/license.txt for BSD license. +USING: alien.syntax ; +IN: unix.statvfs.openbsd + +C-STRUCT: statvfs + { "ulong" "f_bsize" } + { "ulong" "f_frsize" } + { "fsblkcnt_t" "f_blocks" } + { "fsblkcnt_t" "f_bfree" } + { "fsblkcnt_t" "f_bavail" } + { "fsfilcnt_t" "f_files" } + { "fsfilcnt_t" "f_ffree" } + { "fsfilcnt_t" "f_favail" } + { "ulong" "f_fsid" } + { "ulong" "f_flag" } + { "ulong" "f_namemax" } ; + +: ST_RDONLY 1 ; inline +: ST_NOSUID 2 ; inline + +FUNCTION: int statvfs ( char* path, statvfs* buf ) ; diff --git a/basis/unix/statvfs/openbsd/tags.txt b/basis/unix/statvfs/openbsd/tags.txt new file mode 100644 index 0000000000..6bf68304bb --- /dev/null +++ b/basis/unix/statvfs/openbsd/tags.txt @@ -0,0 +1 @@ +unportable diff --git a/basis/unix/statvfs/statvfs.factor b/basis/unix/statvfs/statvfs.factor new file mode 100644 index 0000000000..e610140397 --- /dev/null +++ b/basis/unix/statvfs/statvfs.factor @@ -0,0 +1,12 @@ +! Copyright (C) 2008 Doug Coleman. +! See http://factorcode.org/license.txt for BSD license. +USING: combinators system vocabs.loader ; +IN: unix.statvfs + +os { + { linux [ "unix.statvfs.linux" require ] } + { macosx [ "unix.statvfs.macosx" require ] } + { freebsd [ "unix.statvfs.freebsd" require ] } + { netbsd [ "unix.statvfs.netbsd" require ] } + { openbsd [ "unix.statvfs.openbsd" require ] } +} case diff --git a/basis/unix/statvfs/tags.txt b/basis/unix/statvfs/tags.txt new file mode 100644 index 0000000000..6bf68304bb --- /dev/null +++ b/basis/unix/statvfs/tags.txt @@ -0,0 +1 @@ +unportable diff --git a/core/io/files/files.factor b/core/io/files/files.factor index 7c7a2ece31..77b37180c6 100644 --- a/core/io/files/files.factor +++ b/core/io/files/files.factor @@ -187,7 +187,8 @@ SYMBOL: +unknown+ HOOK: file-systems os ( -- array ) -TUPLE: file-system-info device-name mount-point type free-space ; +TUPLE: file-system-info device-name mount-point type +available-space free-space used-space total-space ; HOOK: file-system-info os ( path -- file-system-info ) diff --git a/extra/line-art/authors.txt b/extra/line-art/authors.txt deleted file mode 100644 index 6a0dc7293a..0000000000 --- a/extra/line-art/authors.txt +++ /dev/null @@ -1 +0,0 @@ -Joe Groff \ No newline at end of file diff --git a/extra/line-art/summary.txt b/extra/line-art/summary.txt deleted file mode 100644 index 06d16da2bf..0000000000 --- a/extra/line-art/summary.txt +++ /dev/null @@ -1 +0,0 @@ -Stanford Bunny rendered with cartoon-style lines instead of shading \ No newline at end of file diff --git a/extra/line-art/tags.txt b/extra/line-art/tags.txt deleted file mode 100644 index 0db7e8e629..0000000000 --- a/extra/line-art/tags.txt +++ /dev/null @@ -1,3 +0,0 @@ -demos -opengl -glsl \ No newline at end of file