úÎqÎeä¯      !"#$%&'()*+,-./0123456789:;<=>?@ABCDEFGHIJKLMNOPQRSTUVWXYZ[\]^_`abcdefghijklm n o p q r s t u v w x y z { | } ~  € ‚ ƒ „ … † ‡ ˆ ‰ Š ‹ Œ Ž ‘’“”•–—˜™š›œžŸ ¡¢£¤¥¦§¨©ª«¬­® SafeReturns True if posix-paths was compiled with support for the provided flag. (As of this writing, the only flag for which this check may be necessary is $; all other flags will always yield True.) O_CLOEXEC0 is not supported on every POSIX platform. Use  oCloexec to determine if support for  O_CLOEXEC@ was compiled into your version of posix-paths. (If not, using oCloexec will throw an exception.)        © 2016 Julian OspaldBSD3"Julian Ospald <hasufell@posteo.de> experimentalportableSafeF*Open and optionally create this file. See   $ for information on how to use the FileMode type.=Note that passing `Just x` as the 4th argument triggers the 1 status flag, which must be set when you pass in 0 to the status flags. Also see the manpage for open(2).¯°status flags of open(2)PJust x => creates the file with the given modes, Nothing => the file must exist.¯°© 2016 Julian OspaldGPL-2"Julian Ospald <hasufell@posteo.de> experimentalportableSafe {If the value of the first argument is True, then execute the action provided in the second argument, otherwise do nothing.!|If the value of the first argument is False, then execute the action provided in the second argument, otherwise do nothing. ! ! ! !© 2016 Julian OspaldBSD3"Julian Ospald <hasufell@posteo.de> experimentalportableSafeF)"Path separator character#*Check if a character is the path separator+\n -> (_chr n == '/') == isPathSeparator n$Search path separator%1Check if a character is the search path separator0\n -> (_chr n == ':') == isSearchPathSeparator n&File extension separator'4Check if a character is the file extension separator)\n -> (_chr n == '.') == isExtSeparator n(Split a ±# into a path+filename and extensionsplitExtension "file.exe"("file",".exe")splitExtension "file" ("file","")"splitExtension "/path/file.tar.gz"("/path/file.tar",".gz"):\path -> uncurry (BS.append) (splitExtension path) == path)Get the final extension from a ±takeExtension "file.exe"".exe"takeExtension "file"""!takeExtension "/path/file.tar.gz"".gz"*Change a file's extensionJ\path -> let ext = takeExtension path in replaceExtension path ext == path+ Drop the final extension from a ±dropExtension "file.exe""file"dropExtension "file""file"!dropExtension "/path/file.tar.gz""/path/file.tar",Add an extension to a ±addExtension "file" ".exe" "file.exe"addExtension "file.tar" ".gz" "file.tar.gz"addExtension "/path/" ".ext" "/path/.ext"-Operator version of ,. Check if a ± has an extensionhasExtension "file"FalsehasExtension "file.tar"TruehasExtension "/path.part1/"False/Split a ± on the first extension#splitExtensions "/path/file.tar.gz"("/path/file",".tar.gz")<\path -> uncurry addExtension (splitExtensions path) == path0Remove all extensions from a ±"dropExtensions "/path/file.tar.gz" "/path/file"1Take all extensions from a ±"takeExtensions "/path/file.tar.gz" ".tar.gz"2Split a ± into (path,file). : is the inversesplitFileName "path/file.txt"("path/","file.txt")splitFileName "path/" ("path/","")splitFileName "file.txt"("./","file.txt")Y\path -> uncurry combine (splitFileName path) == path || fst (splitFileName path) == "./"3Get the file nametakeFileName "path/file.txt" "file.txt"takeFileName "path/"""4Change the file name9\path -> replaceFileName path (takeFileName path) == path5Drop the file namedropFileName "path/file.txt""path/"dropFileName "file.txt""./"6/Get the file name, without a trailing extensiontakeBaseName "path/file.tar.gz" "file.tar"takeBaseName """"7Change the base name(replaceBaseName "path/file.tar.gz" "bob" "path/bob.gz"9\path -> replaceBaseName path (takeBaseName path) == path8BGet the directory, moving up one level if it's already a directorytakeDirectory "path/file.txt""path"takeDirectory "file""."takeDirectory "/path/to/" "/path/to"takeDirectory "/path/to""/path"9$Change the directory component of a ±e\path -> replaceDirectory path (takeDirectory path) `equalFilePath` path || takeDirectory path == ".":Join two paths togethercombine "/" "file""/file"combine "/path/to" "file""/path/to/file"combine "file" "/absolute/path""/absolute/path";Operator version of combine<'Split a path into a list of components:splitPath "/path/to/file.txt"["/","path/","to/","file.txt"]+\path -> BS.concat (splitPath path) == path=Like <, but without trailing slashes$splitDirectories "/path/to/file.txt"["/","path","to","file.txt"]splitDirectories ""[]>Join a split path back together*\path -> joinPath (splitPath path) == path!joinPath ["path","to","file.txt"]"path/to/file.txt"?Normalise a file. normalise "/file/\\test////""/file/\\test/"normalise "/file/./test" "/file/test"#normalise "/test/file/../bob/fred/""/test/file/../bob/fred/"normalise "../bob/fred/""../bob/fred/"normalise "./bob/fred/" "bob/fred/",normalise "./bob////.fred/./...///./..///#.""bob/.fred/.../../#." normalise ".""."normalise "./""./"normalise "./.""./"normalise "/./""/" normalise "/""/"normalise "bob/fred/." "bob/fred/"normalise "//home""/home"@!Check if the last character of a ± is ².!hasTrailingPathSeparator "/path/"TruehasTrailingPathSeparator "/"True hasTrailingPathSeparator "/path"FalseAAdd a trailing path separator. addTrailingPathSeparator "/path""/path/"!addTrailingPathSeparator "/path/""/path/"addTrailingPathSeparator "/""/"B Remove a trailing path separator"dropTrailingPathSeparator "/path/""/path"%dropTrailingPathSeparator "/path////""/path"dropTrailingPathSeparator "/""/"dropTrailingPathSeparator "//""/"CCheck if a path is absoluteisAbsolute "/path"TrueisAbsolute "path"False isAbsolute ""FalseDCheck if a path is relative+\path -> isRelative path /= isAbsolute pathE:Is a FilePath valid, i.e. could you create a file like it? isValid ""False isValid "\0"FalseisValid "/random_ path:*"TrueF@Is the given path a valid filename? This includes "." and "..".isFileName "lal"TrueisFileName "."TrueisFileName ".."True isFileName ""FalseisFileName "\0"FalseisFileName "/random_ path:*"FalseG7Check if the filepath has any parent directories in it.hasParentDir "/.."TruehasParentDir "foo/bar/.."TruehasParentDir "foo/../bar/."TruehasParentDir "foo/bar"FalsehasParentDir "foo"FalsehasParentDir ""FalsehasParentDir ".."FalseHbEquality of two filepaths. The filepaths are normalised and trailing path separators are dropped.equalFilePath "foo" "foo"TrueequalFilePath "foo" "foo/"TrueequalFilePath "foo" "./foo"TrueequalFilePath "foo" "/foo"FalseequalFilePath "foo" "FOO"FalseequalFilePath "foo" "../foo"False\p -> equalFilePath p pI"Whether the file is a hidden file.hiddenFile ".foo"TruehiddenFile "..foo.bar"TruehiddenFile "some/path/.bar"TruehiddenFile "..."TruehiddenFile "dod.bar"FalsehiddenFile "."FalsehiddenFile ".."False hiddenFile ""False³0Combine two paths, assuming rhs is NOT absolute.*"#$%&'()*+,-./0123456789:;<=>?@ABCDEFGHI´³6µ¶·¸¹º»¼½¾¿ÀÁ±"#$%&'()*+,-./0123456789:;<=>?@ABCDEFGHI("#$%&'()*+,.-/0123456789:;<>=?@ABDCEFGHI*"#$%&'()*+,-./0123456789:;<=>?@ABCDEFGHI´³© 2016 Julian OspaldBSD3"Julian Ospald <hasufell@posteo.de> experimentalportableNone FMJ6Get all files from a directory and its subdirectories.Upon entering a directory, Jy will get all entries strictly. However the returned list is lazy in that directories will only be accessed on demand.)Follows symbolic links for the input dir.K?Get all files from a directory and its subdirectories strictly.)Follows symbolic links for the input dir.LRecursively apply the action7 to the parent directory and all files/subdirectories.5This function allows for memory-efficient traversals.)Follows symbolic links for the input dir.P.Gets all directory contents (not recursively).Q Binding to  fdopendir(3).RLike P except for a file descriptor.;To avoid complicated error checks, the file descriptor is always closed, even if Q2 fails. Usually, this only happens on successful QD and after the directory stream is closed. Also see the manpage of  fdopendir(3) for more details.S*return the canonicalized absolute pathname like canonicalizePath, but uses  realpath(3)ÂÃÄÅÆÇÈÉJKLÊMNOPQRËS JKLMNOPQRS PRJKLONMQSÂÃÄÅÆÇÈÉJKLÊMNOPQRËSSafe+UPath of some base and type.>Internally is a string. The string can be of two formats only: !without trailing path separator: file.txt,  foo/bar.txt,  /foo/bar.txtwith trailing path separator: foo/,  /foo/bar/(There are no duplicate path separators //, no .., no ./, no ~/, etc.ÌSame as  .The following property holds: x == y "a show x == show yÍString ordering.The following property holds: 'show x `compare` show y "a x `compare` yÎString equality.The following property holds: show x == show y "a x == yTUVÏÌÍÎTUVUVTTUVÏÌÍÎ+© 2015 2016 FP Complete, 2016 Julian Ospald BSD 3 clause"Julian Ospald <hasufell@posteo.de> experimentalportableSafe+ZX"Exception when parsing a location.YA filename, without any ².Z$A relative path; one without a root.[An absolute path.]@Get a location for an absolute path. Produces a normalised path.Throws: X#parseAbs "/abc" :: Maybe (Path Abs) Just "/abc" parseAbs "/" :: Maybe (Path Abs)Just "/"'parseAbs "/abc/def" :: Maybe (Path Abs)Just "/abc/def",parseAbs "/abc/def/.///" :: Maybe (Path Abs)Just "/abc/def/""parseAbs "abc" :: Maybe (Path Abs)NothingparseAbs "" :: Maybe (Path Abs)Nothing*parseAbs "/abc/../foo" :: Maybe (Path Abs)Nothing^@Get a location for a relative path. Produces a normalised path. Note that filepath may contain any number of ./ but may not consist solely of ./$. It also may not contain a single .. anywhere.Throws: X "parseRel "abc" :: Maybe (Path Rel) Just "abc"#parseRel "def/" :: Maybe (Path Rel) Just "def/"&parseRel "abc/def" :: Maybe (Path Rel)Just "abc/def"(parseRel "abc/def/." :: Maybe (Path Rel)Just "abc/def/"#parseRel "/abc" :: Maybe (Path Rel)NothingparseRel "" :: Maybe (Path Rel)Nothing)parseRel "abc/../foo" :: Maybe (Path Rel)Nothing parseRel "." :: Maybe (Path Rel)Nothing!parseRel ".." :: Maybe (Path Rel)Nothing_AParses a filename. Filenames must not contain slashes. Excludes Ð and '..'.Throws: X parseFn "abc" :: Maybe (Path Fn) Just "abc" parseFn "..." :: Maybe (Path Fn) Just "..."!parseFn "def/" :: Maybe (Path Fn)Nothing$parseFn "abc/def" :: Maybe (Path Fn)Nothing&parseFn "abc/def/." :: Maybe (Path Fn)Nothing!parseFn "/abc" :: Maybe (Path Fn)NothingparseFn "" :: Maybe (Path Fn)Nothing'parseFn "abc/../foo" :: Maybe (Path Fn)NothingparseFn "." :: Maybe (Path Fn)NothingparseFn ".." :: Maybe (Path Fn)Nothing`&Convert any Path to a ByteString type.a.Convert an absolute Path to a ByteString type.b-Convert a relative Path to a ByteString type.cAppend two paths.bThe second argument must always be a relative path, which ensures that undefinable things like `"abc" <> "/def"` cannot happen.žTechnically, the first argument can be a path that points to a non-directory, because this library is IO-agnostic and makes no assumptions about file types.,(MkPath "/") </> (MkPath "file" :: Path Rel)"/file"3(MkPath "/path/to") </> (MkPath "file" :: Path Rel)"/path/to/file"0(MkPath "/") </> (MkPath "file/lal" :: Path Rel) "/file/lal"-(MkPath "/") </> (MkPath "file/" :: Path Rel)"/file/"dIStrip directory from path, making it relative to that directory. Throws Couldn'tStripPrefixDir* if directory is not a parent of the path.The bases must match.J(MkPath "/lal/lad") `stripDir` (MkPath "/lal/lad/fad") :: Maybe (Path Rel) Just "fad"H(MkPath "lal/lad") `stripDir` (MkPath "lal/lad/fad") :: Maybe (Path Rel) Just "fad"8(MkPath "/") `stripDir` (MkPath "/") :: Maybe (Path Rel)NothingJ(MkPath "/lal/lad/fad") `stripDir` (MkPath "/lal/lad") :: Maybe (Path Rel)Nothing<(MkPath "fad") `stripDir` (MkPath "fad") :: Maybe (Path Rel)Nothinge>Is p a parent of the given location? Implemented in terms of d. The bases must match.8(MkPath "/lal/lad") `isParentOf` (MkPath "/lal/lad/fad")True6(MkPath "lal/lad") `isParentOf` (MkPath "lal/lad/fad")True&(MkPath "/") `isParentOf` (MkPath "/")False8(MkPath "/lal/lad/fad") `isParentOf` (MkPath "/lal/lad")False*(MkPath "fad") `isParentOf` (MkPath "fad")FalsefGet all parents of a path.%getAllParents (MkPath "/abs/def/dod")["/abs/def","/abs","/"]getAllParents (MkPath "/")[]g%Extract the directory name of a path.The following properties hold: dirname (p </> a) == dirname pdirname (MkPath "/abc/def/dod") "/abc/def"dirname (MkPath "/")"/"h Extract the file part of a path.The following properties hold:  basename (p </> a) == basename aThrows: W if given the root path "/"3basename (MkPath "/abc/def/dod") :: Maybe (Path Fn) Just "dod"(basename (MkPath "/") :: Maybe (Path Fn)NothingWÑXÒÓÔÕYZ[\]^_`abcdefghijkÖרÙÚUWXYZ[\]^_`abcdefghijk[UZYXW\]_^ab`chgefdijkWÑXÒÓÔÕYZ[\]^_`abcdefghijkÖרÙÚ © 2016 Julian OspaldGPL-2"Julian Ospald <hasufell@posteo.de> experimentalportableSafe+N „Uses y and throws p if it returns True.…^Check if the files are the same by examining device and file id. This follows symbolic links.†ÓChecks whether the destination directory is contained within the source directory by comparing the device+file ID of the source directory with all device+file IDs of the parent directories of the destination.‡RChecks if the given file exists and is not a directory. Does not follow symlinks.ˆNChecks if the given file exists and is a directory. Does not follow symlinks.‰,Checks whether a file or folder is writable.ŠWChecks whether the directory at the given path exists and can be opened. This invokes  openDirStream which follows symlinks.‹ Throws a uG HPathIOException if the directory at the given path cannot be opened.Œ¡Carries out an action, then checks if there is an IOException and a specific errno. If so, then it carries out another action, otherwise it rethrows the error.šExecute the given action and retrow IO exceptions as a new Exception that have the given errno. If errno does not match the exception is rethrown as is.ŽLike Û, with arguments swapped.Like Ü‚, but allows to have different clean-up actions depending on whether the in-between computation has raised an exception or not. &mnopqrstuvwxyz{|}~€‚ƒ„…† source dir.full destination, `dirname dest` must exist‡ˆ‰Š‹Œerrno to catch-action to try, which can raise an IOExceptionEaction to carry out in case of an IOException and if errno matcheserrno to catchrethrow as if errno matches action to tryŽcomputation to run first8computation to run last, when no exception was raised8computation to run last, when an exception was raisedcomputation to run in-betweenreaction on IO errorsreaction on HPathIOExceptionÝÞ$mnopqrstuvwxyz{|}~€‚ƒ„…†‡ˆ‰Š‹ŒŽ$mnopqrstuvwxyz{|}~€‚ƒ„…†‡ˆ‰Š‹ŒŽm nopqrstuvwxyz{|}~€‚ƒ„…†‡ˆ‰Š‹ŒŽÝÞ© 2016 Julian OspaldGPL-2"Julian Ospald <hasufell@posteo.de> experimentalportableNoneMlApplies realpath on the given absolute path.Throws:ß- if the file at the given path does not existß if the symlink is broken™YCopies a directory recursively to the given destination. Does not follow symbolic links.Safety/reliability concerns: not atomicexamines filetypes explicitlyan explicit check †Ô is carried out for the top directory for basic sanity, because otherwise we might end up with an infinite copy loop... however, this operation is not carried out recursively (because it's slow)Throws:ß# if source directory does not existà$ if output directory is not writableà$ if source directory can't be openedá, if source directory is wrong type (symlink)á1 if source directory is wrong type (regular file)p. if source and destination are the same file (m)â if destination already existsq( if destination is contained in source (m)šLike ™6 except it overwrites contents of directories if any.Throws:ß# if source directory does not existà$ if output directory is not writableà$ if source directory can't be openedá, if source directory is wrong type (symlink)á1 if source directory is wrong type (regular file)p. if source and destination are the same file (m)q( if destination is contained in source (m)›Recreate a symlink.Throws:á% if symlink file is wrong type (file)á* if symlink file is wrong type (directory)à) if output directory cannot be written toà% if source directory cannot be openedâ# if destination file already existsp. if source and destination are the same file (m) Note: calls symlinkœŽCopies the given regular file to the given destination. Neither follows symbolic links, nor accepts them. For "copying" symbolic links, use › instead.Throws:ß if source file does not existà$ if output directory is not writableà$ if source directory can't be openedá' if source file is wrong type (symlink)á) if source file is wrong type (directory)p. if source and destination are the same file (m)â if destination already exists Note: calls sendfile and possibly ã/write as fallbackLike œz except it overwrites the destination if it already exists. This also works if source and destination are the same file.Safety/reliability concerns:$not atomic, since it uses read/writeThrows:ß if source file does not existà$ if output directory is not writableà$ if source directory can't be openedá' if source file is wrong type (symlink)á) if source file is wrong type (directory)p. if source and destination are the same file (m) Note: calls sendfile and possibly ã/write as fallbackž_Copies anything. In case of a symlink, it is just recreated, even if it points to a directory.Safety/reliability concerns:examines filetypes explicitlycalls ™ for directoriesŸLike žà except it overwrites the destination if it already exists. For directories, this overwrites contents without pruning them, so the resulting directory may have more files than have been copied. 9Deletes the given file, does not follow symlinks. Raises eISDIR8 if run on a directory. Does not follow symbolic links.Throws:ä for wrong file type (directory)ß if the file does not existà if the directory cannot be read¡ADeletes the given directory, which must be empty, never symlinks.Throws:ä+ for wrong file type (symlink to directory)ä# for wrong file type (regular file)ß if directory does not existå if directory is not emptyà. if we can't open or write to parent directory Notes: calls rmdir¢PDeletes the given directory recursively. Does not follow symbolic links. Tries ¡/ first before attemtping a recursive deletion.Safety/reliability concerns: not atomicexamines filetypes explicitlyThrows:ä+ for wrong file type (symlink to directory)ä# for wrong file type (regular file)ß if directory does not existà. if we can't open or write to parent directory£¡Deletes a file, directory or symlink, whatever it may be. In case of directory, performs recursive deletion. In case of a symlink, the symlink file is deleted.Safety/reliability concerns:examines filetypes explicitlycalls ¢ for directories¤eOpens a file appropriately by invoking xdg-open. The file type is not checked. This forks a process.¥BExecutes a program with the given arguments. This forks a process.¦LCreate an empty regular file at the given directory with the given filename.Throws:à) if output directory cannot be written toâ# if destination file already exists§ICreate an empty directory at the given directory with the given filename.Throws:à) if output directory cannot be written toâ( if destination directory already exists¨nRename a given file with the provided filename. Destination and source must be on the same device, otherwise æ will be raised.CDoes not follow symbolic links, but renames the symbolic link file.Safety/reliability concerns:@has a separate set of exception handling, apart from the syscallThrows:ß if source file does not existà) if output directory cannot be written toà% if source directory cannot be openedç3 if source and destination are on different devicesr# if destination file already existss( if destination directory already existsp. if destination and source are the same file (m) Note: calls è3 (but does not allow to rename over existing files)©dMove a file. This also works across devices by copy-delete fallback. And also works on directories.CDoes not follow symbolic links, but renames the symbolic link file.Safety/reliability concerns:-copy-delete fallback is inherently non-atomicThrows:ß if source file does not existà) if output directory cannot be written toà% if source directory cannot be openedr# if destination file already existss( if destination directory already existsp. if destination and source are the same file (m) Note: calls è3 (but does not allow to rename over existing files)ªLike ©., but overwrites the destination if it exists.CDoes not follow symbolic links, but renames the symbolic link file.Safety/reliability concerns:-copy-delete fallback is inherently non-atomic?checks for file types and destination file existence explicitlyThrows:ß if source file does not existà) if output directory cannot be written toà% if source directory cannot be openedp. if destination and source are the same file (m) Note: calls è3 (but does not allow to rename over existing files)«#Default permissions for a new file.¬(Default permissions for a new directory.­tGets all filenames of the given directory. This excludes "." and "..". This version does not follow symbolic links.Throws:ß if directory does not existä if file type is wrong (file)ä( if file type is wrong (symlink to file)ä' if file type is wrong (symlink to dir)à if directory cannot be opened®YGet the file type of the file located at the given path. Does not follow symbolic links.Throws:ß if the file does not existà* if any part of the path is not accessible l‘’“”•–—˜™ source dirfull destinationš source dirfull destination›the old symlink filedestination fileœ source filedestination file source filedestination fileé source filedestination filežŸ ¡¢£¤¥program arguments¦§¨© file to move destinationª file to move destination«¬­ dir to read®l‘’“”•–—˜™š›œžŸ ¡¢£¤¥¦§¨©ª«¬­®‘’“”•–—˜™š›œžŸ ¡¢£¤¥¦§¨©ª«¬­®ll‘’“”•–—˜™š›œéžŸ ¡¢£¤¥¦§¨©ª«¬­®ê !"#$%&'()*+,-./0123456789:;<=>?@ABCDEFGHIJKLMNOPQRSTUVWXYZ[\]^_` abcdef ghi jkGlmnopqrst u v w x y z { | } ~  € ‚ ƒ „ … † ‡ ˆ ‰ Š ‹ Œ Ž ‘ ’ “ ” • – — ˜™š›œžŸ ¡¢£¤¥¦§¨©ª«¬­®¯°±²³´µ¶·¸¹º»¼½¾¿À¹ºÁ¹ºÂ¹ºÃ¹ºÄ¹ºÅ¹ºÆ¹ºÇ¹ºÈ¹ºÉ¹ºÊ¹ºË¹ºÌ¹ºÍÎÏÐÑÒÓÔÕÖרÙÚÛ¼ÜÝÞßàáâãäåæç¼èé¼êë ì í¼îï¼îð¼îñ¼îò¼óô¼îõ¼îö¼÷ø¼îù¹úûüýhpath_3HA04X6oHoTLpEvmHljjxaSystem.Posix.Directory.ForeignSystem.Posix.FDHPath.IO.UtilsSystem.Posix.FilePath!System.Posix.Directory.TraversalsHPath.InternalHPathHPath.IOHPath.IO.Errors System.PosixFilesPath toFilePathFlagsUnsupportedFlagDirTypeunFlags isSupportedoCloexecdtBlkdtChrdtDirdtFifodtLnkdtRegdtSock dtUnknownoAppendoAsyncoCreat oDirectoryoExcloNoctty oNofollow oNonblockoRdonlyoWronlyoRdwroSyncoTruncpathMax unionFlagsopenFdwhenMunlessM pathSeparatorisPathSeparatorsearchPathSeparatorisSearchPathSeparator extSeparatorisExtSeparatorsplitExtension takeExtensionreplaceExtension dropExtension addExtension<.> hasExtensionsplitExtensionsdropExtensionstakeExtensions splitFileName takeFileNamereplaceFileName dropFileName takeBaseNamereplaceBaseName takeDirectoryreplaceDirectorycombine splitPathsplitDirectoriesjoinPath normalisehasTrailingPathSeparatoraddTrailingPathSeparatordropTrailingPathSeparator isAbsolute isRelativeisValid isFileName hasParentDir equalFilePath hiddenFileallDirectoryContentsallDirectoryContents'traverseDirectoryunpackDirStream packDirStream readDirEntgetDirectoryContents fdOpendirgetDirectoryContents'realpathRelCMkPath PathExceptionPathParseExceptionFnRelAbsparseAbsparseRelparseFnfromAbsfromRelstripDir isParentOf getAllParentsdirnamebasename withAbsPath withRelPath withFnPathcanonicalizePathHPathIOExceptionFileDoesNotExistDirDoesNotExistSameFileDestinationInSource FileDoesExist DirDoesExistInvalidOperationCan'tOpenDirectory CopyFailedisFileDoesNotExistisDirDoesNotExist isSameFileisDestinationInSourceisFileDoesExistisDirDoesExistisInvalidOperationisCan'tOpenDirectory isCopyFailedthrowFileDoesExistthrowDirDoesExistthrowFileDoesNotExistthrowDirDoesNotExist throwSameFilesameFilethrowDestinationInSource doesFileExistdoesDirectoryExist isWritablecanOpenDirectorythrowCantOpenDirectory catchErrnorethrowErrnoAs handleIOError bracketeer reactOnErrorFileType Directory RegularFile SymbolicLink BlockDeviceCharacterDevice NamedPipeSocketcopyDirRecursivecopyDirRecursiveOverwriterecreateSymlinkcopyFilecopyFileOverwriteeasyCopyeasyCopyOverwrite deleteFile deleteDirdeleteDirRecursive easyDeleteopenFile executeFilecreateRegularFile createDir renameFilemoveFilemoveFileOverwrite newFilePerms newDirPerms getDirsFiles getFileTypec_openopen_unix_KZL8h98IqDM57kQSPo1mKx System.Posix.ByteString.FilePath RawFilePathbaseGHC.Real/ combineRawsplitFileNameRawthrowErrnoPathIfMinus1_throwErrnoPathIfMinus1throwErrnoPathIfNullthrowErrnoPathIf_throwErrnoPathIfthrowErrnoPaththrowErrnoPathIfRetrythrowErrnoPathIfNullRetrythrowErrnoPathIfMinus1Retry_throwErrnoPathIfMinus1RetrypeekFilePathLen peekFilePath withFilePathCDirentCDir c_fdopendir c_realpathc_typec_name c_freeDirEnt c_readdiractOnDirContents_dirloop $fShowPath $fOrdPath$fEqPath $fNFDataPathGHC.Base.RootDirHasNoBasename InvalidAbs InvalidRel InvalidFnCouldn'tStripPrefixTPS stripPrefix$fRelCFn $fRelCRel$fExceptionPathException$fExceptionPathParseExceptionSystem.IO.Error catchIOErrorControl.Exception.Basebracket$fExceptionHPathIOException$fShowHPathIOExceptionGHC.IO.Exception NoSuchThingPermissionDeniedInvalidArgument AlreadyExists Text.ReadreadInappropriateTypeUnsatisfiedConstraintsForeign.C.ErroreXDEVUnsupportedOperationSystem.Posix.Files.ByteStringrename _copyFile