| Safe Haskell | Safe-Inferred |
|---|
Agda.Utils.FileName
Description
Operations on file names.
- data AbsolutePath
- filePath :: AbsolutePath -> FilePath
- rootName :: AbsolutePath -> String
- mkAbsolute :: FilePath -> AbsolutePath
- absolute :: FilePath -> IO AbsolutePath
- (===) :: AbsolutePath -> AbsolutePath -> Bool
- doesFileExistCaseSensitive :: FilePath -> IO Bool
- tests :: IO Bool
Documentation
data 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.
Andreas, 2014-03-30:
For efficiency of serialization, AbsolutePath is implemented
as ByteString which short-cuts equality testing using
pointer equality. This saves 20% of the serialization time
of the standard library!
Instances
filePath :: AbsolutePath -> FilePathSource
Extract the AbsolutePath to be used as FilePath.
rootName :: AbsolutePath -> StringSource
maps blablablafoo.bar.xxx to foo.bar.
mkAbsolute :: FilePath -> AbsolutePathSource
Constructs AbsolutePaths.
Precondition: The path must be absolute and valid.
absolute :: FilePath -> IO AbsolutePathSource
Makes the path absolute.
This function may raise an __IMPOSSIBLE__ error if
canonicalizePath does not return an absolute path.
(===) :: AbsolutePath -> AbsolutePath -> BoolSource
Tries to establish if the two file paths point to the same file (or directory).
doesFileExistCaseSensitive :: FilePath -> IO BoolSource
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 insenstively.)