import Os.Platform
The Os.Platform class contains portable operating system calls. This implementation is for Windows.
type Platform in Vc, W32 :Target and host platforms
type Attribute is &Status information for a file or directory.
Dir = -1 word, & 0 if a file, 1 if a directory,
& -1 if not found, -2 if a unix link.
Date word, &OS encoded time of the last modification.
Size cell, &Size of a file
Read Bit, &Path has read permission
Write Bit, &Path has write permission
Execute Bit, &An executable file
File |= 0, &Path is a file
Directory |= 1, &Path is a directory
Missing |= -1, &Path item is missing
Link |= -2, &Path is a Unix link
Is( .Member ) => $Dir = $.Member :Test if a File, Directory, Missing, or Link
type C.String is &Structure for accessing a null terminated string
@C[?] byte :At the C string
type C.String.Put is &Structure for writing to a null terminated string
*C[?] byte :C string Wizard
type C.String.Cast is &Structure for converting strings
@C[?] = 0 byte, &At the C string
Head[span(@)-1] byte :Storage for a short string
Home.Path string :Full Home path (lower case, trailing path.slash)
Home.Share string :Home.Drive alias (lower; no trailing slash)
Home.Drive byte :Drive letter for the home path (upper case)
Path.Slash = '\' byte :Display slash format; may be '/' or '\'
Library.Suffix |= ".lib" :Static library file suffix
Dynamic.Suffix |= ".dll" :Dynamic library file suffix
Environment |= ';' :Environment variable list delimiter
New.Line |= "^M^J" :Preferred line separator for output
Null.Device |= "nul" :File name used to discard output
Browser |= "EXPLORER.EXE" :File system browser application
Special |= " ""'`*#?!%=~,(){}[]<>|^^&;"
:::::::::::: Common C Procedures : To.String( C[?] byte ) ==> Text string To.C.String( string ) ==> C[?] = ? byte Cast_Type( From[0] byte ) ==> *To[?] byte ERROREXIT entry Message[?] byte :::::::::::: File Procedures : FILE.ATTRIBUTE change Path string, entry File string, exit Attribute TOUCH.FILE entry File string Program.Path() ==> Path string PROGRAM_PATH change Text[?] byte File.Time( Time word ) ==> Form string File.Size( Path string ) ==> Size cell IS.PROGRAM.GRAPHICAL entry Program string, exit Window Bit IS.FILE.PROGRAM entry File string, exit Program Bit FILE_INDEX entry File, exit Index[0] cell DUAL.HIDDEN entry Dual string, change Hidden Bit MOVE.FILE.STATUS entry From string, To string, exit Status[0] byte COPY.FILE.STATUS entry From string, To string, exit Status[0] byte :::::::::::: Directory Procedures : MAKE.DIRECTORY entry Path string DELETE.EMPTY.DIRECTORY entry Directory string, exit Status byte OPEN_DIRECTORY entry Id[0] Directory.Id, entry Text[?] byte NEXT_DIRECTORY change Id[0] Directory.Id, change Text[0] C.String NEXT_ATTRIBUTE change Id[0] Directory.Id, change Text[0] C.String, change Attribute CLOSE_DIRECTORY change Id[0] Directory.Id pure SAVE_DIRECTORY RESTORE_DIRECTORY :::::::::::: Path Procedures : RENAME.PATH entry Old string, entry New string, exit Status[0] byte RENAME_PATH entry Old[?] byte, entry New[?] byte, change Status[0] byte Path.Attribute( Path string ) ==> Attribute IS.HIDDEN.PATH entry Os.Path string, exit Hidden Bit IS.REMOTE.PATH entry Os.Path string, exit Remote Bit IS.NETWORK.PATH entry Os.Path string, exit Shared Bit FORM.BASE.OS.PATH change Path string pure FORM.LONG.PATH change Path string :::::::: Utility Procedures : Time_1970() ==> Time cell SLEEP_MS entry Time word WARNING_BELL LOGOUT LOGOUT_NOW INSERT_CLIP COPY_CLIP entry Size word RUN_NET_DIRECTORY RESET_NET_DIRECTORY