| ||||||||||
| ||||||||||
| Description | ||||||||||
| Various abstractions for dealing with paths. | ||||||||||
| Synopsis | ||||||||||
| Documentation | ||||||||||
| class FilePathOrURL a where | ||||||||||
| ||||||||||
| class FilePathOrURL a => FilePathLike a where | ||||||||||
| ||||||||||
| newtype SubPath | ||||||||||
| ||||||||||
| newtype AbsolutePath | ||||||||||
| ||||||||||
| data AbsolutePathOrStd | ||||||||||
| ||||||||||
| data AbsoluteOrRemotePath | ||||||||||
| ||||||||||
| class CharLike c where | ||||||||||
| ||||||||||
| makeSubPathOf :: AbsolutePath -> AbsolutePath -> Maybe SubPath | ||||||||||
| Make the second path relative to the first, if possible | ||||||||||
| simpleSubPath :: FilePath -> Maybe SubPath | ||||||||||
| ioAbsolute :: FilePath -> IO AbsolutePath | ||||||||||
| Interpret a possibly relative path wrt the current working directory. | ||||||||||
| makeAbsolute :: AbsolutePath -> FilePath -> AbsolutePath | ||||||||||
Take an absolute path and a string representing a (possibly relative) path and combine them into an absolute path. If the second argument is already absolute, then the first argument gets ignored. This function also takes care that the result is converted to Posix convention and normalized. Also, parent directories ("..") at the front of the string argument get canceled out against trailing directory parts of the absolute path argument. Regarding the last point, someone more familiar with how these functions are used should verify that this is indeed necessary or at least useful. | ||||||||||
| (/-) :: AbsolutePath -> String -> AbsolutePath | ||||||||||
| simpleClean :: String -> String | ||||||||||
| Convert to posix, remove trailing slashes, and (under Posix) reduce multiple leading slashes to one. | ||||||||||
| rootDirectory :: AbsolutePath | ||||||||||
| The root directory as an absolute path. | ||||||||||
| makeAbsoluteOrStd :: AbsolutePath -> String -> AbsolutePathOrStd | ||||||||||
| ioAbsoluteOrStd :: String -> IO AbsolutePathOrStd | ||||||||||
| useAbsoluteOrStd :: (AbsolutePath -> IO a) -> IO a -> AbsolutePathOrStd -> IO a | ||||||||||
| Execute either the first or the second argument action, depending on whether the given path is an AbsolutePath or stdin/stdout. | ||||||||||
| ioAbsoluteOrRemote :: String -> IO AbsoluteOrRemotePath | ||||||||||
| isRemote :: AbsoluteOrRemotePath -> Bool | ||||||||||
| takeDirectory :: AbsolutePath -> AbsolutePath | ||||||||||
| pathToPosix :: FilePath -> FilePath | ||||||||||
| Normalize the path separator to Posix style (slash, not backslash). This only affects Windows systems. | ||||||||||
| norm_slashes :: FilePath -> FilePath | ||||||||||
| Reduce multiple leading slashes to one. This only affects Posix systems. | ||||||||||
| getCurrentDirectory :: IO AbsolutePath | ||||||||||
| setCurrentDirectory :: FilePathLike p => p -> IO () | ||||||||||
| sp2fn :: SubPath -> FileName | ||||||||||
| Produced by Haddock version 2.4.2 |