Fix a couple of problems preventing bootstrap
parent
c3391ac0ae
commit
3929d02f17
|
@ -55,7 +55,7 @@ ARTICLE: "fs-meta" "File meta-data"
|
|||
{ $subsection link-info }
|
||||
{ $subsection exists? }
|
||||
{ $subsection directory? }
|
||||
{ $subsection file-modified }
|
||||
! { $subsection file-modified }
|
||||
{ $subsection stat } ;
|
||||
|
||||
ARTICLE: "delete-move-copy" "Deleting, moving, copying files"
|
||||
|
@ -222,7 +222,7 @@ HELP: stat ( path -- directory? permissions length modified )
|
|||
"Queries the file system for file meta data. If the file does not exist, outputs " { $link f } " for all four values."
|
||||
} ;
|
||||
|
||||
{ stat exists? directory? file-modified } related-words
|
||||
{ stat exists? directory? } related-words
|
||||
|
||||
HELP: path+
|
||||
{ $values { "str1" "a string" } { "str2" "a string" } { "str" "a string" } }
|
||||
|
@ -250,9 +250,9 @@ HELP: directory*
|
|||
{ $description "Outputs the contents of a directory named by " { $snippet "path" } "." }
|
||||
{ $notes "Unlike " { $link directory } ", this word prepends the directory's path to all file names in the list." } ;
|
||||
|
||||
HELP: file-modified
|
||||
{ $values { "path" "a pathname string" } { "n" "a non-negative integer or " { $link f } } }
|
||||
{ $description "Outputs a file's last modification time, since midnight January 1, 1970. If the file does not exist, outputs " { $link f } "." } ;
|
||||
! HELP: file-modified
|
||||
! { $values { "path" "a pathname string" } { "n" "a non-negative integer or " { $link f } } }
|
||||
! { $description "Outputs a file's last modification time, since midnight January 1, 1970. If the file does not exist, outputs " { $link f } "." } ;
|
||||
|
||||
HELP: resource-path
|
||||
{ $values { "path" "a pathname string" } { "newpath" "a pathname string" } }
|
||||
|
|
|
@ -219,8 +219,11 @@ M: pathname <=> [ pathname-string ] compare ;
|
|||
: with-file-reader ( path encoding quot -- )
|
||||
>r <file-reader> r> with-stream ; inline
|
||||
|
||||
! : file-contents ( path encoding -- str )
|
||||
! dupd [ file-info file-info-size read ] with-file-reader ;
|
||||
|
||||
: file-contents ( path encoding -- str )
|
||||
dupd [ file-info file-info-size read ] with-file-reader ;
|
||||
dupd [ file-length read ] with-file-reader ;
|
||||
|
||||
: with-file-writer ( path encoding quot -- )
|
||||
>r <file-writer> r> with-stream ; inline
|
||||
|
|
|
@ -68,7 +68,7 @@ M: unix-io delete-directory ( path -- )
|
|||
] with-disposal ;
|
||||
|
||||
M: unix-io copy-file ( from to -- )
|
||||
[ (copy-file) ] 2keep swap file-permissions chmod io-error ;
|
||||
[ (copy-file) ] 2keep swap file-info file-info-permissions io-error ;
|
||||
|
||||
: stat>type ( stat -- type )
|
||||
stat-st_mode {
|
||||
|
|
Loading…
Reference in New Issue