!#0      !"#$%&'()*+,-./0123456789:;<=>?@ABCDEFGHIJKLMNOPQRSTUVWXYZ[\]^_`abcdefghijklmnopqrstuvwxyz{|}~ 2016 Julian OspaldBSD3"Julian Ospald <hasufell@posteo.de> experimentalportableNone2X' hpath-ioA type for giving failure hints on recursive failure, which allows to programmatically make choices without examining the weakly typed I/O error attributes (like ioeGetFileName).`The first argument to the data constructor is always the source and the second the destination. hpath-ioJAdditional generic IO exceptions that the posix functions do not provide.hpath-ioThrows  AlreadyExists  if file exists.hpath-ioThrows  AlreadyExists  if directory exists.hpath-ioUses  and throws   if it returns True.hpath-io^Check if the files are the same by examining device and file id. This follows symbolic links.hpath-ioChecks 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.hpath-ioCarries 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.hpath-ioExecute 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.hpath-ioLike , with arguments swapped.hpath-ioLike , but allows to have different clean-up actions depending on whether the in-between computation has raised an exception or not.hpath-io source dirhpath-iofull destination,  dirname dest must existhpath-ioerrno to catchhpath-io-action to try, which can raise an IOExceptionhpath-ioEaction to carry out in case of an IOException and if errno matcheshpath-ioerrno to catchhpath-iorethrow as if errno matcheshpath-io action to tryhpath-iocomputation to run firsthpath-io8computation to run last, when no exception was raisedhpath-io8computation to run last, when an exception was raisedhpath-iocomputation to run in-between hpath-ioreaction on IO errorshpath-ioreaction on HPathIOException     None"#>SX)None"#>SX)xSafe0,hpath-ioReturns 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.)-hpath-io 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.)&(')*+,-./0123456789:;<=>?@ABCD)*&('+,-.6/C7081D29:3;4<5=>?@AB 2016 Julian OspaldBSD3"Julian Ospald <hasufell@posteo.de> experimentalportableNone%PWCbIhpath-io6Get all files from a directory and its subdirectories.Upon entering a directory, Iy 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.Jhpath-io?Get all files from a directory and its subdirectories strictly.)Follows symbolic links for the input dir.Khpath-ioRecursively 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.Ohpath-io.Gets all directory contents (not recursively).Phpath-io Binding to  fdopendir(3).Qhpath-ioLike O except for a file descriptor.;To avoid complicated error checks, the file descriptor is always closed, even if P2 fails. Usually, this only happens on successful PD and after the directory stream is closed. Also see the manpage of  fdopendir(3) for more details.Rhpath-io*return the canonicalized absolute pathname like canonicalizePath, but uses  realpath(3) IJKLMNOPQR OQIJKNMLPR 2016 Julian OspaldBSD3"Julian Ospald <hasufell@posteo.de> experimentalportableSafePKShpath-io*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 81 status flag, which must be set when you pass in :0 to the status flags. Also see the manpage for open(2).Shpath-iostatus flags of open(2)hpath-ioJust xJ => creates the file with the given modes, Nothing => the file must exist.SS 2016 Julian OspaldBSD3"Julian Ospald <hasufell@posteo.de> experimentalportableNone>Wt*hpath-ioWChecks whether the directory at the given path exists and can be opened. This invokes  which follows symlinks.hpath-io,Checks whether a file or folder is writable.BOnly eACCES, eROFS, eTXTBSY, ePERM are catched (and return False).Throws: if the file does not existhpath-ioNChecks if the given file exists and is a directory. Does not follow symlinks.+Only eNOENT is catched (and returns False).hpath-ioRChecks if the given file exists and is not a directory. Does not follow symlinks.+Only eNOENT is catched (and returns False).hpath-ioJConverts any path to an absolute path. This is done in the following way:6if the path is already an absolute one, just return it<if it's a relative path, prepend the current directory to ithpath-ioApplies realpath on the given path.Throws:- if the file at the given path does not exist if the symlink is brokenThpath-iosThe mode for copy and file moves. Overwrite mode is usually not very well defined, but is a convenience shortcut.Uhpath-iofail if any target existsVhpath-iooverwrite targetsWhpath-io(The error mode for recursive operations.On X the whole operation fails immediately if any of the recursive sub-operations fail, which is sort of the default for IO operations.On Y` skips errors in the recursion and keeps on recursing. However all errors are collected in the N error type, which is raised finally if there was any error. Also note that K does not give any guarantees on the ordering of the collected exceptions.bhpath-ioCopies the contents of a directory recursively to the given destination, while preserving permissions. Does not follow symbolic links. This behaves more or less like the following, without descending into the destination if it already exists: ) cp -a /source/dir /destination/somedir DFor directory contents, this will ignore any file type that is not \, ] or [.For V copy mode this does not prune destination directory contents, so the destination might contain more files than the source after the operation has completed. Permissions of existing directories are fixed.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 source directory can't be opened 4 if source and destination are the same file ( ) . if destination is contained in source ( ) Throws in X RecursiveErrorMode only:$ if output directory is not writable, if source directory is wrong type (symlink)1 if source directory is wrong type (regular file) Throws in Y RecursiveErrorMode only:e if any of the recursive operations that are not part of the top-directory sanity-checks fail ( ) Throws in U CopyMode only: if destination already existsNote: may call getcwd) (only if destination is a relative path)chpath-ioRecreate a symlink.In V8 copy mode only files and empty directories are deleted.Safety/reliability concerns:V mode is inherently non-atomicThrows:- if source file is wrong type (not a symlink)) if output directory cannot be written to% if source directory cannot be opened 4 if source and destination are the same file ( ) Throws in U mode only: if destination already exists Throws in V mode only:+ if destination file is non-empty directoryNotes:calls symlinkcalls getcwd6 in Overwrite mode (if destination is a relative path)dhpath-ioCopies the given regular file to the given destination. Neither follows symbolic links, nor accepts them. For "copying" symbolic links, use c instead.yNote that this is still sort of a low-level function and doesn't examine file types. For a more high-level version, use e instead.In V> copy mode only overwrites actual files, not directories. In U* mode the destination file must not exist.Safety/reliability concerns:V mode is not atomic when used on _], reads the "contents" and copies them to a regular file, which might take indefinitely when used on ^, may either read the "contents" and copy them to a regular file (potentially hanging indefinitely) or may create a regular empty destination file when used on `, will hang indefinitelyThrows: if source file does not exist if source file is a a a$ if output directory is not writable$ if source directory can't be opened4 if source file is wrong type (symlink or directory) 4 if source and destination are the same file ( ) Throws in U mode only: if destination already existsNotes: may call getcwd6 in Overwrite mode (if destination is a relative path)ehpath-ioCopies a regular file, directory or symbolic link. In case of a symbolic link it is just recreated, even if it points to a directory. Any other file type is ignored.Safety/reliability concerns:examines filetypes explicitlycalls b for directoriesNote: may call getcwd6 in Overwrite mode (if destination is a relative path)fhpath-ioDeletes the given file. 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 readghpath-ioADeletes 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 rmdirhhpath-ioPDeletes the given directory recursively. Does not follow symbolic links. Tries g/ first before attemtping a recursive deletion.(On directory contents this behaves like i1 and thus will ignore any file type that is not \, ] or [.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 directoryihpath-ioDeletes a file, directory or symlink. In case of directory, performs recursive deletion. In case of a symlink, the symlink file is deleted. Any other file type is ignored.Safety/reliability concerns:examines filetypes explicitlycalls h for directoriesjhpath-ioeOpens a file appropriately by invoking xdg-open. The file type is not checked. This forks a process.khpath-ioBExecutes a program with the given arguments. This forks a process.lhpath-ioMCreate an empty regular file at the given directory with the given filename.Throws:) if output directory cannot be written to if destination already exists? if any of the parent components of the path do not existmhpath-ioICreate an empty directory at the given directory with the given filename.Throws:) if output directory cannot be written to if destination already exists? if any of the parent components of the path do not existnhpath-ioICreate an empty directory at the given directory with the given filename.Throws:) if output directory cannot be written to? if any of the parent components of the path do not existohpath-ioCreate an empty directory at the given directory with the given filename. All parent directories are created with the same filemode. This basically behaves like:  mkdir -p /some/dir Safety/reliability concerns: not atomicThrows:O if any part of the path components do not exist and cannot be written to= if destination already exists and is *not* a directory Note: calls getcwd% if the input path is a relative pathphpath-ioCreate a symlink.Throws:) if output directory cannot be written to# if destination file already exists? if any of the parent components of the path do not exist Note: calls symlinkqhpath-ionRename 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: if source and destination are on different devices if destination already exists 5 if destination and source are the same file ( ) Note: calls 3 (but does not allow to rename over existing files)rhpath-iodMove 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:V mode is not atomic-copy-delete fallback is inherently non-atomicsince this function calls e and i as a fallback to q, file types that are not \, ] or [ may be ignoredfor VL mode, the destination will be deleted (not recursively) before movingThrows: if source file does not exist) if output directory cannot be written to% if source directory cannot be opened 5 if destination and source are the same file ( ) Throws in U mode only: if destination already existsNotes:calls 3 (but does not allow to rename over existing files)calls getcwd4 in Overwrite mode if destination is a relative pathshpath-ioRead the given file *at once* into memory as a lazy ByteString. Symbolic links are followed, no sanity checks on file size or file type. File must exist. Uses Builders under the hood (hence lazy ByteString).Safety/reliability concerns:<the whole file is read into memory, this doesn't read lazilyThrows:+ if file is not a regular file or a symlinkC if we cannot read the file or the directory containting it if the file does not existthpath-ioaOpen the given file as a filestream. Once the filestream is exits, the filehandle is cleaned up.Throws:+ if file is not a regular file or a symlinkC if we cannot read the file or the directory containting it if the file does not existuhpath-ioVWrite a given ByteString to a file, truncating the file beforehand. Follows symlinks.Throws:+ if file is not a regular file or a symlinkC if we cannot read the file or the directory containting it if the file does not existvhpath-io[Write a given lazy ByteString to a file, truncating the file beforehand. Follows symlinks.Throws:+ if file is not a regular file or a symlinkC if we cannot read the file or the directory containting it if the file does not exist"Note: uses streamly under the hoodwhpath-ioLAppend a given ByteString to a file. The file must exist. Follows symlinks.Throws:+ if file is not a regular file or a symlinkC if we cannot read the file or the directory containting it if the file does not existxhpath-io#Default permissions for a new file.yhpath-io(Default permissions for a new directory.zhpath-io;Checks if the given file exists. Does not follow symlinks.+Only eNOENT is catched (and returns False).{hpath-io,Checks whether a file or folder is readable.BOnly eACCES, eROFS, eTXTBSY, ePERM are catched (and return False).Throws: if the file does not exist|hpath-io.Checks whether a file or folder is executable.BOnly eACCES, eROFS, eTXTBSY, ePERM are catched (and return False).Throws: if the file does not existhpath-iotGets all filenames of the given directory. This excludes "." and "..". This version does not follow symbolic links.FThe contents are not sorted and there is no guarantee on the ordering.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 opened8 if a filename could not be parsed (should never happen)hpath-ioLike F, but returns the filename only, instead of prepending the base path.hpath-ioYGet 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 accessiblehpath-io_Helper function to use the Path library without buying into the Path type too much. This uses  under the hood and may throw .Throws:M if the bytestring could neither be parsed as relative or absolute Pathhpath-io2Convenience function to open the path as a handle.4If the file does not exist, it will be created with x.Throws:M if the bytestring could neither be parsed as relative or absolute Path bhpath-io source dirhpath-io:destination (parent dirs are not automatically created)chpath-iothe old symlink filehpath-iodestination filedhpath-io source filehpath-iodestination filekhpath-ioprogramhpath-io argumentsphpath-iodestination filehpath-iopath the symlink points torhpath-io file to movehpath-io destinationuhpath-ioif Nothing, file must existvhpath-ioif Nothing, file must existhpath-io dir to readhpath-io dir to read7TUVWXYZ[\]a^_`bcdefghijklmnopqrstuvwxyz{|}~7Z[\]a^_`WXYTUVbcdefghijklmnopqrstuvwxyz{|}~     !"#$%&'()*+,-./001223456789:;<=>?@ABCDEFGHIJKLMNOPQRSTUVWXYZ[\]^_`abcdefghijklmnopqrstuvwxyz{|}~&hpath-io-0.11.0-F9FcYO4Feke19dH6k4WOwjHPath.IOHPath.IO.ErrorsSystem.Posix.Directory.Foreign!System.Posix.Directory.TraversalsSystem.Posix.FDStreamly.ByteStringStreamly.ByteString.Lazy System.PosixFilescanOpenDirectory isWritabledoesDirectoryExist doesFileExisttoAbscanonicalizePathRecursiveFailureHintReadContentsFailedCreateDirFailedCopyFileFailedRecreateSymlinkFailedHPathIOExceptionSameFileDestinationInSourceRecursiveFailure isSameFileisDestinationInSourceisRecursiveFailureisReadContentsFailedisCreateDirFailedisCopyFileFailedisRecreateSymlinkFailedthrowFileDoesExistthrowDirDoesExist throwSameFilesameFilethrowDestinationInSource catchErrnorethrowErrnoAs handleIOError hideError bracketeer reactOnError$fExceptionHPathIOException$fEqRecursiveFailureHint$fShowRecursiveFailureHint$fEqHPathIOException$fShowHPathIOExceptionFlagsUnsupportedFlagDirTypeunFlags isSupportedoCloexecdtBlkdtChrdtDirdtFifodtLnkdtRegdtSock dtUnknownoAppendoAsyncoCreat oDirectoryoExcloNoctty oNofollow oNonblockoRdonlyoWronlyoRdwroSyncoTruncpathMax unionFlags $fEqDirType $fShowDirType $fEqFlags $fShowFlagsallDirectoryContentsallDirectoryContents'traverseDirectoryunpackDirStream packDirStream readDirEntgetDirectoryContents fdOpendirgetDirectoryContents'realpathopenFdCopyModeStrict OverwriteRecursiveErrorMode FailEarlyCollectFailuresFileType Directory RegularFile SymbolicLink BlockDeviceCharacterDevice NamedPipeSocketcopyDirRecursiverecreateSymlinkcopyFileeasyCopy deleteFile deleteDirdeleteDirRecursive easyDeleteopenFile executeFilecreateRegularFile createDircreateDirIfMissingcreateDirRecursive createSymlink renameFilemoveFilereadFilereadFileStream writeFile writeFileL appendFile newFilePerms newDirPerms doesExist isReadable isExecutablegetModificationTimesetModificationTimesetModificationTimeHiRes getDirsFiles getDirsFiles' getFileTypewithRawFilePath withHandle $fEqFileType$fShowFileTypebaseGHC.IO.ExceptionIOError(exceptions-0.10.4-622ySnQapwMAU2KS1exqorControl.Monad.Catch catchIOError.safe-exceptions-0.1.7.0-JIns11DhTTRKUEalvQYe6pControl.Exception.Safebracket toByteStringarrayToByteStringbyteStringToArrayfromByteString stepFunction unix-2.7.2.2!System.Posix.Directory.ByteString openDirStream NoSuchThingPermissionDeniedInvalidArgumentInappropriateType AlreadyExistsUnsatisfiedConstraintsForeign.C.ErroreXDEVUnsupportedOperationSystem.Posix.Files.ByteStringrename#hpath-0.10.2-EoIMwnez2hGAVu3lzaWV3vHPathPathParseExceptionparseAny