getCurrentDirectory

Obtain the current working directory as an absolute path. In a multithreaded program, the current working directory is a global state shared among all threads of the process. Therefore, when performing filesystem operations from multiple threads, it is highly recommended to use absolute rather than relative paths (see: makeAbsolute). Note that getCurrentDirectory is not guaranteed to return the same path received by setCurrentDirectory. On POSIX systems, the path returned will always be fully dereferenced (not contain any symbolic links). For more information, refer to the documentation of getcwd. The operation may fail with:
  • HardwareFault A physical I/O error has occurred. [EIO]
  • isDoesNotExistError There is no path referring to the working directory. [EPERM, ENOENT, ESTALE...]
  • isPermissionError The process has insufficient privileges to perform the operation. [EACCES]
  • isFullError Insufficient resources are available to perform the operation.
  • UnsupportedOperation The operating system has no notion of current working directory.
Obtain the current working directory as an absolute path. In a multithreaded program, the current working directory is a global state shared among all threads of the process. Therefore, when performing filesystem operations from multiple threads, it is highly recommended to use absolute rather than relative paths (see: makeAbsolute). Note that getCurrentDirectory is not guaranteed to return the same path received by setCurrentDirectory. On POSIX systems, the path returned will always be fully dereferenced (not contain any symbolic links). For more information, refer to the documentation of getcwd. The operation may fail with:
  • HardwareFault A physical I/O error has occurred. [EIO]
  • isDoesNotExistError There is no path referring to the working directory. [EPERM, ENOENT, ESTALE...]
  • isPermissionError The process has insufficient privileges to perform the operation. [EACCES]
  • isFullError Insufficient resources are available to perform the operation.
  • UnsupportedOperation The operating system has no notion of current working directory.
If the operating system has a notion of current directories, getCurrentDirectory returns an absolute path to the current directory of the calling process. The operation may fail with:
  • HardwareFault A physical I/O error has occurred. [EIO]
  • isDoesNotExistError / NoSuchThing There is no path referring to the current directory. [EPERM, ENOENT, ESTALE...]
  • isPermissionError / PermissionDenied The process has insufficient privileges to perform the operation. [EACCES]
  • ResourceExhausted Insufficient resources are available to perform the operation.
  • UnsupportedOperation The operating system has no notion of current directory.
Obtain the current working directory as an absolute path. In a multithreaded program, the current working directory is a global state shared among all threads of the process. Therefore, when performing filesystem operations from multiple threads, it is highly recommended to use absolute rather than relative paths (see: makeAbsolute). The operation may fail with:
  • HardwareFault A physical I/O error has occurred. [EIO]
  • isDoesNotExistError There is no path referring to the working directory. [EPERM, ENOENT, ESTALE...]
  • isPermissionError The process has insufficient privileges to perform the operation. [EACCES]
  • isFullError Insufficient resources are available to perform the operation.
  • UnsupportedOperation The operating system has no notion of current working directory.
No description available in the introspection data.