os.Path methods

Table 1. Class methods
Name Description
os.Path.atime(
   fname STRING)
  RETURNING result STRING
Returns the time of the last file access.
os.Path.baseName(
   filename STRING)
  RETURNING result STRING
Returns the last element of a path.
os.Path.chDir(
   newdir STRING)
  RETURNING result INTEGER
Changes the current working directory.
os.Path.chOwn(
   fname STRING,
   uid INTEGER,
   gui INTEGER )
  RETURNING result INTEGER
Changes the UNIX owner and group of a file.
os.Path.chRwx(
   fname STRING,
   mode INTEGER )
  RETURNING result INTEGER
Changes the UNIX permissions of a file.
os.Path.chVolume(
   new STRING)
  RETURNING result INTEGER
Changes the current working volume.
os.Path.copy(
   source STRING,
   dest STRING )
  RETURNING result INTEGER
Creates a new file by copying an existing file.
os.Path.delete(
   dname STRING)
  RETURNING result INTEGER
Deletes a file or a directory.
os.Path.dirClose(
   dirhandle INTEGER)
Closes the directory referenced by the directory opened by os.Path.diropen().
os.Path.dirFMask(
   mask INTEGER)
Defines a filter mask for os.Path.dirOpen().
os.Path.dirName(
   filename STRING)
  RETURNING result STRING
Returns all components of a path excluding the last one.
os.Path.dirNext(
   dirhandle INTEGER)
  RETURNING direntry STRING
Reads the next entry in the directory opened with os.Path.dirOpen().
os.Path.dirOpen(
   dname STRING)
  RETURNING dirhandle INTEGER
Opens a directory and returns an integer handle to this directory.
os.Path.dirSort(
   criteria STRING,
   order INTEGER )
Defines the sort criteria and sort order for os.Path.dirOpen().
os.Path.executable(
   fname STRING)
  RETURNING result INTEGER
Checks if a file is executable.
os.Path.exists(
   fname STRING)
  RETURNING result INTEGER
Checks if a file exists.
os.Path.extension(
   fname STRING)
  RETURNING result  STRING
Returns the file extension.
os.Path.fullPath(
   path STRING)
  RETURNING result STRING
Returns the canonical equivalent of a path.
os.Path.gid(
   fname STRING)
  RETURNING id INTEGER
Returns the UNIX group id of a file.
os.Path.homeDir()
  RETURNING homedir STRING
Returns the path to the HOME directory of the current user.
os.Path.isDirectory(
   fname STRING)
  RETURNING result BOOLEAN
Checks if a file is a directory.
os.Path.isFile(
   fname STRING)
  RETURNING result BOOLEAN
Checks if a file is a regular file.
os.Path.isHidden(
   fname STRING)
  RETURNING result BOOLEAN
Checks if a file is hidden.
os.Path.isLink(
   fname STRING)
  RETURNING result BOOLEAN
Checks if a file is UNIX symbolic link.
os.Path.isRoot(
   path STRING)
  RETURNING result BOOLEAN
Checks if a file path is a root path.
os.Path.join(
   begin STRING,
   end STRING )
  RETURNING result STRING
Joins two path segments adding the platform-dependent separator.
os.Path.makeTempName()
  RETURNING result STRING
Generates a temporary file name.
os.Path.mkDir(
   dname STRING)
  RETURNING result INTEGER
Creates a new directory.
os.Path.mtime(
   fname STRING)
  RETURNING result STRING
Returns the time of the last file modification.
os.Path.pathSeparator()
  RETURNING result STRING
Returns the character used in environment variables to separate path elements.
os.Path.pathType(
   path STRING)
  RETURNING result STRING
Checks if a path is a relative path or an absolute path.
os.Path.pwd()
  RETURNING result STRING
Returns the current working directory.
os.Path.readable(
   fname STRING)
  RETURNING result INTEGER
Checks if a file is readable.
os.Path.rename(
   oldname STRING,
   newname STRING )
  RETURNING result INTEGER
Renames a file or a directory.
os.Path.rootDir()
  RETURNING rootdir STRING
Returns the root directory of the current working path.
os.Path.rootName(
   filename STRING)
  RETURNING result STRING
Returns the file path without the file extension of the last element of the file path.
os.Path.rwx(
   fname STRING)
  RETURNING mode INTEGER
Returns the UNIX file permissions of a file.
os.Path.separator()
  RETURNING result STRING
Returns the character used to separate path segments.
os.Path.size(
   fname STRING)
  RETURNING result INTEGER
Returns the size of a file.
os.Path.type(
   fname STRING)
  RETURNING result STRING
Returns the file type as a string.
os.Path.uid(
   fname STRING)
  RETURNING id INTEGER
Returns the UNIX user id of a file.
os.Path.volumes()
  RETURNING volumes STRING
Returns the available volumes.
os.Path.writable(
   fname STRING)
  RETURNING result INTEGER
Checks if a file is writable.