io.files.temp.windows: fix up
parent
5948f53725
commit
8b9b8df457
|
@ -1,13 +1,17 @@
|
|||
! (c)2012 Joe Groff bsd license
|
||||
USING: ;
|
||||
USING: alien.data alien.strings io.directories
|
||||
io.encodings.utf16n io.files.temp io.pathnames kernel math
|
||||
memoize specialized-arrays system windows.errors
|
||||
windows.kernel32 windows.ole32 windows.shell32
|
||||
windows.types ;
|
||||
SPECIALIZED-ARRAY: WCHAR
|
||||
IN: io.files.temp.windows
|
||||
|
||||
<PRIVATE
|
||||
|
||||
: (get-temp-directory) ( -- path )
|
||||
MAX_PATH dup <WCHAR-array> [ GetTempPath ] keep
|
||||
swap win32-error
|
||||
MAX_PATH 1 + dup WCHAR <c-array> [ GetTempPath ] keep
|
||||
swap win32-error=0/f
|
||||
utf16n alien>string ;
|
||||
|
||||
: (get-appdata-directory) ( -- path )
|
||||
|
@ -15,9 +19,9 @@ IN: io.files.temp.windows
|
|||
CSIDL_LOCAL_APPDATA CSIDL_FLAG_CREATE bitor
|
||||
f
|
||||
0
|
||||
MAX_PATH <WCHAR-array>
|
||||
MAX_PATH 1 + WCHAR <c-array>
|
||||
[ SHGetFolderPath ] keep
|
||||
swap win32-error
|
||||
swap ole32-error
|
||||
utf16n alien>string ;
|
||||
|
||||
PRIVATE>
|
||||
|
|
|
@ -1402,7 +1402,8 @@ ALIAS: GetSystemWindowsDirectory GetSystemWindowsDirectoryW
|
|||
! FUNCTION: GetTempFileNameA
|
||||
! FUNCTION: GetTempFileNameW
|
||||
! FUNCTION: GetTempPathA
|
||||
! FUNCTION: GetTempPathW
|
||||
FUNCTION: DWORD GetTempPathW ( DWORD nBufferLength, LPWSTR lpBuffer ) ;
|
||||
ALIAS: GetTempPath GetTempPathW
|
||||
! FUNCTION: GetThreadContext
|
||||
! FUNCTION: GetThreadIOPendingFlag
|
||||
! FUNCTION: GetThreadLocale
|
||||
|
|
Loading…
Reference in New Issue