directory-1.3.1.5: Platform-agnostic library for filesystem operations

System.Directory.Internal

Description

Internal modules are always subject to change from version to version. The contents of this module are also platform-dependent, hence what is shown in the Hackage documentation may differ from what is actually available on your system.

Synopsis

Documentation

tryIOErrorType :: (IOError -> Bool) -> IO a -> IO (Either IOError a) Source #

Similar to try but only catches a specify kind of IOError as specified by the predicate.

data FileType Source #

Constructors

Instances

 Source # Methods Source # MethodsenumFrom :: FileType -> [FileType] #enumFromTo :: FileType -> FileType -> [FileType] # Source # Methods Source # Methods(<) :: FileType -> FileType -> Bool #(>) :: FileType -> FileType -> Bool # Source # Methods Source # MethodsshowList :: [FileType] -> ShowS #

Check whether the given FileType is considered a directory by the operating system. This affects the choice of certain functions e.g. removeDirectory vs removeFile.

Constructors

 Permissions Fieldsreadable :: Bool writable :: Bool executable :: Bool searchable :: Bool

Instances

 Source # Methods Source # Methods Source # Methods Source # MethodsshowList :: [Permissions] -> ShowS #

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 or NoSuchThing There is no path referring to the working directory. [EPERM, ENOENT, ESTALE...]
• isPermissionError or 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 working directory.

Convert a path into an absolute path. If the given path is relative, the current directory is prepended. If the path is already absolute, the path is returned unchanged. The function preserves the presence or absence of the trailing path separator.

If the path is already absolute, the operation never fails. Otherwise, the operation may fail with the same exceptions as getCurrentDirectory.

(internal API)

c_free :: Ptr a -> IO () Source #

data CTimeSpec Source #

Constructors

 CTimeSpec EpochTime CLong

Instances

 Source # MethodspokeElemOff :: Ptr CTimeSpec -> Int -> CTimeSpec -> IO () #peekByteOff :: Ptr b -> Int -> IO CTimeSpec #pokeByteOff :: Ptr b -> Int -> CTimeSpec -> IO () #poke :: Ptr CTimeSpec -> CTimeSpec -> IO () #