redo home implementation
parent
26aee8687b
commit
ab0ed9f988
|
@ -5,7 +5,8 @@ unix unix.stat unix.time kernel math continuations
|
||||||
math.bitwise byte-arrays alien combinators calendar
|
math.bitwise byte-arrays alien combinators calendar
|
||||||
io.encodings.binary accessors sequences strings system
|
io.encodings.binary accessors sequences strings system
|
||||||
io.files.private destructors vocabs.loader calendar.unix
|
io.files.private destructors vocabs.loader calendar.unix
|
||||||
unix.stat alien.c-types arrays unix.users unix.groups ;
|
unix.stat alien.c-types arrays unix.users unix.groups
|
||||||
|
environment ;
|
||||||
IN: io.unix.files
|
IN: io.unix.files
|
||||||
|
|
||||||
M: unix cwd ( -- path )
|
M: unix cwd ( -- path )
|
||||||
|
@ -294,3 +295,5 @@ M: string set-file-group ( path string -- )
|
||||||
|
|
||||||
: file-group-name ( path -- string )
|
: file-group-name ( path -- string )
|
||||||
file-group-id group-name ;
|
file-group-id group-name ;
|
||||||
|
|
||||||
|
M: unix home "HOME" os-env ;
|
||||||
|
|
|
@ -1,7 +1,7 @@
|
||||||
USING: continuations destructors io.buffers io.files io.backend
|
USING: continuations destructors io.buffers io.files io.backend
|
||||||
io.timeouts io.ports io.windows io.windows.files
|
io.timeouts io.ports io.windows io.windows.files
|
||||||
io.windows.nt.backend windows windows.kernel32
|
io.windows.nt.backend windows windows.kernel32
|
||||||
kernel libc math threads system
|
kernel libc math threads system environment
|
||||||
alien.c-types alien.arrays alien.strings sequences combinators
|
alien.c-types alien.arrays alien.strings sequences combinators
|
||||||
combinators.short-circuit ascii splitting alien strings
|
combinators.short-circuit ascii splitting alien strings
|
||||||
assocs namespaces make io.files.private accessors tr ;
|
assocs namespaces make io.files.private accessors tr ;
|
||||||
|
@ -59,3 +59,5 @@ M: winnt FileArgs-overlapped ( port -- overlapped )
|
||||||
M: winnt open-append
|
M: winnt open-append
|
||||||
[ dup file-info size>> ] [ drop 0 ] recover
|
[ dup file-info size>> ] [ drop 0 ] recover
|
||||||
>r (open-append) r> >>ptr ;
|
>r (open-append) r> >>ptr ;
|
||||||
|
|
||||||
|
M: winnt home "USERPROFILE" os-env ;
|
||||||
|
|
|
@ -332,10 +332,6 @@ C: <pathname> pathname
|
||||||
M: pathname <=> [ string>> ] compare ;
|
M: pathname <=> [ string>> ] compare ;
|
||||||
|
|
||||||
! Home directory
|
! Home directory
|
||||||
HOOK: home os ( -- dir )
|
HOOK: home io-backend ( -- dir )
|
||||||
|
|
||||||
M: winnt home "USERPROFILE" os-env ;
|
M: object home "" resource-path ;
|
||||||
|
|
||||||
M: wince home "" resource-path ;
|
|
||||||
|
|
||||||
M: unix home "HOME" os-env ;
|
|
||||||
|
|
Loading…
Reference in New Issue