These methods are used to handle files and directories on the server side.
os.Path methods can be used to:
check the path type, return, or join its segments;
check or return file/directory properties;
copy, create, delete, or rename files and directories;
perform other operations on files and directories.
Some methods can be used on UNIX systems only.
os.Path methods are invoked in the following way:
CALL os.Path.<Method>(<parameters>)
returns date and time when the specified file was accessed for the last time |
|
returns a string value standing for the last element of the path |
|
changes the current working directory |
|
changes the UNIX owner and the group of the specified file |
|
changes the UNIX permission of the specified file |
|
changes the current working volume |
|
creates a new file by copying the already existing one |
|
deletes the specified file or directory |
|
closes the directory referenced by the directory handle |
|
defines a filter mask for os.Path.diropen |
|
returns all components of a path excluding the last one |
|
reads the next entry in the directory |
|
opens a directory and returns this directory an integer handle |
|
defines sort order and sort criteria for the opened directory |
|
checks whether the file is executable |
|
checks whether the file exists |
|
returns the file extension |
|
returns the UNIX group id of the specified file |
|
returns the path to the current user HOME directory |
|
checks whether a file is a directory or not |
|
os.Path.isdirectorysym() |
resolves a symbolic link and checks whether the resolved path is directory or not |
checks whether a file is regular |
|
checks whether the file is hidden |
|
checks whether a file is a UNIX symbolic link |
|
checks whether a file path is a root path |
|
joins two segments of the path and adds the platform-dependent separator to the returning path |
|
creates a new directory |
|
returns the time of the latest modification of a file |
|
returns the path separator |
|
checks whether a path is relative or absolute |
|
returns the current working directory |
|
checks whether the file is readable |
|
changes the name of a file or directory |
|
returns the root directory of the current working path |
|
returns the file path with its last element without an extension |
|
returns the UNIX file permissions of a file |
|
returns the character that separates the path segments |
|
returns the size of a file |
|
returns the file type as a STRING |
|
returns the UNIX user id of a file |
|
returns the available volumes |
|
checks whether the file is writable |