the directory word no longer sorts, this makes available-modules a tad faster
parent
1c2596114e
commit
ee57472bcc
|
@ -15,7 +15,7 @@ strings styles arrays ;
|
|||
|
||||
: directory ( path -- seq )
|
||||
(directory)
|
||||
[ { "." ".." } member? not ] subset natural-sort ;
|
||||
[ { "." ".." } member? not ] subset ;
|
||||
|
||||
: file-length ( path -- n ) stat 4array third ;
|
||||
|
||||
|
@ -50,7 +50,7 @@ DEFER: directory.
|
|||
dup directory? [ (directory.) ] [ (file.) terpri ] if ;
|
||||
|
||||
: directory. ( path -- )
|
||||
dup directory [ file. ] each-with ;
|
||||
dup directory natural-sort [ file. ] each-with ;
|
||||
|
||||
: home ( -- dir )
|
||||
windows? "USERPROFILE" "HOME" ? os-env [ "." ] unless* ;
|
||||
|
|
Loading…
Reference in New Issue