IO package:path-io

This module provides an interface to System.Directory for users of the Path module. It also implements some extra functionality like recursive scanning and copying of directories, working with temporary files/directories, etc.
Interface to ‘directory’ package for users of ‘path’ Interface to ‘directory’ package for users of ‘path’.
Action returned by the traversal handler function. The action controls how the traversal will proceed. Note: in version 1.4.0 the type was adjusted to have the b type parameter.
Set permissions for the object found on second given path so they match permissions of the object on the first path.
Obtain the time at which the file or directory was last modified. The operation may fail with:
  • isPermissionError if the user is not permitted to read the modification time; or
  • isDoesNotExistError if the file or directory does not exist.
Caveat for POSIX systems: This function returns a timestamp with sub-second resolution only if this package is compiled against unix-2.6.0.0 or later and the underlying filesystem supports them.
The getPermissions operation returns the permissions for the file or directory. The operation may fail with:
  • isPermissionError if the user is not permitted to access the permissions; or
  • isDoesNotExistError if the file or directory does not exist.
Check if there is a file or directory on specified path.
Change the time at which the file or directory was last modified. The operation may fail with:
  • isPermissionError if the user is not permitted to alter the modification time; or
  • isDoesNotExistError if the file or directory does not exist.
Some caveats for POSIX systems:
  • Not all systems support utimensat, in which case the function can only emulate the behavior by reading the access time and then setting both the access and modification times together. On systems where utimensat is supported, the modification time is set atomically with nanosecond precision.
  • If compiled against a version of unix prior to 2.7.0.0, the function would not be able to set timestamps with sub-second resolution. In this case, there would also be loss of precision in the access time.
Note: this is a piece of conditional API, only available if directory-1.2.3.0 or later is used.
The setPermissions operation sets the permissions for the file or directory. The operation may fail with:
  • isPermissionError if the user is not permitted to set the permissions; or
  • isDoesNotExistError if the file or directory does not exist.