Safe Haskell | Safe-Inferred |
---|---|
Language | Haskell2010 |
Operations on file names.
Synopsis
- newtype AbsolutePath = AbsolutePath Text
- filePath :: AbsolutePath -> FilePath
- mkAbsolute :: FilePath -> AbsolutePath
- absolute :: FilePath -> IO AbsolutePath
- canonicalizeAbsolutePath :: AbsolutePath -> IO AbsolutePath
- sameFile :: AbsolutePath -> AbsolutePath -> IO Bool
- doesFileExistCaseSensitive :: FilePath -> IO Bool
- isNewerThan :: FilePath -> FilePath -> IO Bool
Documentation
newtype AbsolutePath Source #
Paths which are known to be absolute.
Note that the Eq
and Ord
instances do not check if different
paths point to the same files or directories.
Instances
filePath :: AbsolutePath -> FilePath Source #
Extract the AbsolutePath
to be used as FilePath
.
mkAbsolute :: FilePath -> AbsolutePath Source #
Constructs AbsolutePath
s.
Precondition: The path must be absolute and valid.
absolute :: FilePath -> IO AbsolutePath Source #
Makes the path absolute.
This function may raise an __IMPOSSIBLE__
error if
canonicalizePath
does not return an absolute path.
canonicalizeAbsolutePath :: AbsolutePath -> IO AbsolutePath Source #
Resolve symlinks etc. Preserves sameFile
.
sameFile :: AbsolutePath -> AbsolutePath -> IO Bool Source #
Tries to establish if the two file paths point to the same file (or directory).
doesFileExistCaseSensitive :: FilePath -> IO Bool Source #
Case-sensitive doesFileExist
for Windows.
This is case-sensitive only on the file name part, not on the directory part. (Ideally, path components coming from module name components should be checked case-sensitively and the other path components should be checked case insensitively.)