Hoogle Search
Within LTS Haskell 24.34 (ghc-9.10.3)
Note that Stackage only displays results for the latest LTS and Nightly snapshot. Learn more.
setCurrentDirectory :: OsPath -> IO ()directory System.Directory.OsPath Change the working directory to the given 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]
- InvalidArgument The operand is not a valid directory name. [ENAMETOOLONG, ELOOP]
- isDoesNotExistError The directory does not exist. [ENOENT, ENOTDIR]
- isPermissionError The process has insufficient privileges to perform the operation. [EACCES]
- UnsupportedOperation The operating system has no notion of current working directory, or the working directory cannot be dynamically changed.
- InappropriateType The path refers to an existing non-directory object. [ENOTDIR]
setModificationTime :: OsPath -> UTCTime -> IO ()directory System.Directory.OsPath 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.
- InvalidArgument on FAT32 file system if the time is before DOS Epoch (1 January 1980).
- 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.
setOwnerExecutable :: Bool -> Permissions -> Permissionsdirectory System.Directory.OsPath No documentation available.
setOwnerReadable :: Bool -> Permissions -> Permissionsdirectory System.Directory.OsPath No documentation available.
setOwnerSearchable :: Bool -> Permissions -> Permissionsdirectory System.Directory.OsPath No documentation available.
setOwnerWritable :: Bool -> Permissions -> Permissionsdirectory System.Directory.OsPath No documentation available.
setPermissions :: OsPath -> Permissions -> IO ()directory System.Directory.OsPath Set the permissions of a file or directory. On Windows, this is only capable of changing the writable permission, which corresponds to the "read-only" attribute. Changing the other permissions has no effect. On POSIX systems, this sets the owner permissions. 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.
setStdGen :: MonadIO m => StdGen -> m ()random System.Random Sets the global pseudo-random number generator. Overwrites the contents of globalStdGen
setByteArray :: (Prim a, PrimMonad m) => MutableByteArray (PrimState m) -> Int -> Int -> a -> m ()primitive Data.Primitive.ByteArray Fill a slice of a mutable byte array with a value. The offset and length are given in elements of type a rather than in bytes. Note: this function does not do bounds checking.
setPrimArray :: (Prim a, PrimMonad m) => MutablePrimArray (PrimState m) a -> Int -> Int -> a -> m ()primitive Data.Primitive.PrimArray Fill a slice of a mutable primitive array with a value. Note: this function does not do bounds checking.