FilePath -> FilePath -> IO ()

copyFile :: FilePath -> FilePath -> IO ()
directory System.Directory
copyFile old new copies the existing file from old to new. If the new file already exists, it is atomically replaced by the old file. Neither path may refer to an existing directory. The permissions of old are copied to new, if possible.
copyPermissions :: FilePath -> FilePath -> IO ()
directory System.Directory
createLink :: FilePath -> FilePath -> IO ()
unix System.Posix.Files
createLink old new creates a new path, new, linked to an existing file, old. Note: calls link.
createSymbolicLink :: FilePath -> FilePath -> IO ()
unix System.Posix.Files
createSymbolicLink file1 file2 creates a symbolic link named file2 which points to the file file1. Symbolic links are interpreted at run-time as if the contents of the link had been substituted into the path being followed to find a file or directory. Note: calls symlink.
rename :: FilePath -> FilePath -> IO ()
unix System.Posix.Files
rename old new renames a file or directory from old to new. Note: calls rename.
renameDirectory :: FilePath -> FilePath -> IO ()
directory System.Directory
renameDirectory old new changes the name of an existing directory from old to new. If the new directory already exists, it is atomically replaced by the old directory. If the new directory is neither the old directory nor an alias of the old directory, it is removed as if by removeDirectory. A conformant implementation need not support renaming directories in all situations (e.g. renaming to an existing directory, or across different physical devices), but the constraints must be documented. On Win32 platforms, renameDirectory fails if the new directory already exists. The operation may fail with: * HardwareFault A physical I/O error has occurred. [EIO] * InvalidArgument Either operand is not a valid directory name. [ENAMETOOLONG, ELOOP] * isDoesNotExistError / NoSuchThing The original directory does not exist, or there is no path to the target. [ENOENT, ENOTDIR] * isPermissionError / PermissionDenied The process has insufficient privileges to perform the operation. [EROFS, EACCES, EPERM] * ResourceExhausted Insufficient resources are available to perform the operation. [EDQUOT, ENOSPC, ENOMEM, EMLINK] * UnsatisfiedConstraints Implementation-dependent constraints are not satisfied. [EBUSY, ENOTEMPTY, EEXIST] * UnsupportedOperation The implementation does not support renaming in this situation. [EINVAL, EXDEV] * InappropriateType Either path refers to an existing non-directory object. [ENOTDIR, EISDIR]
renameFile :: FilePath -> FilePath -> IO ()
directory System.Directory
renameFile old new changes the name of an existing file system object from old to new. If the new object already exists, it is atomically replaced by the old object. Neither path may refer to an existing directory. A conformant implementation need not support renaming files in all situations (e.g. renaming across different physical devices), but the constraints must be documented. The operation may fail with: * HardwareFault A physical I/O error has occurred. [EIO] * InvalidArgument Either operand is not a valid file name. [ENAMETOOLONG, ELOOP] * isDoesNotExistError / NoSuchThing The original file does not exist, or there is no path to the target. [ENOENT, ENOTDIR] * isPermissionError / PermissionDenied The process has insufficient privileges to perform the operation. [EROFS, EACCES, EPERM] * ResourceExhausted Insufficient resources are available to perform the operation. [EDQUOT, ENOSPC, ENOMEM, EMLINK] * UnsatisfiedConstraints Implementation-dependent constraints are not satisfied. [EBUSY] * UnsupportedOperation The implementation does not support renaming in this situation. [EXDEV] * InappropriateType Either path refers to an existing directory. [ENOTDIR, EISDIR, EINVAL, EEXIST, ENOTEMPTY]
appendFile :: FilePath -> String -> IO ()
base Prelude, base System.IO
The computation appendFile file str function appends the string str, to the file file. Note that writeFile and appendFile write a literal string to a file. To write a value of any printable type, as with print, use the show function to convert the value to a string first. > main = appendFile "squares" (show [(x,x*x) | x <- [0,0.1..2]])
writeFile :: FilePath -> String -> IO ()
base Prelude, base System.IO
The computation writeFile file str function writes the string str, to the file file.
throwErrnoPathIfMinus1_ :: Num a => String -> FilePath -> IO a -> IO ()
base Foreign.C.Error
as throwErrnoIfMinus1_, but exceptions include the given path when appropriate.
throwErrnoPathIfMinus1_ :: (Eq a, Num a) => String -> FilePath -> IO a -> IO ()
unix System.Posix.Error
as throwErrnoIfMinus1_, but exceptions include the given path when appropriate.
throwErrnoPathIfMinus1Retry_ :: (Eq a, Num a) => String -> FilePath -> IO a -> IO ()
unix System.Posix.Error
setEnv :: String -> String -> Bool -> IO ()
unix System.Posix.Env
The setEnv function inserts or resets the environment variable name in the current environment list. If the variable name does not exist in the list, it is inserted with the given value. If the variable does exist, the argument overwrite is tested; if overwrite is False, the variable is not reset, otherwise it is reset to the given value.
throwErrnoPath :: String -> FilePath -> IO a
base Foreign.C.Error, unix System.Posix.Error
as throwErrno, but exceptions include the given path when appropriate.
sendTo :: HostName -> PortID -> String -> IO ()
network Network
throwErrnoPathIf_ :: (a -> Bool) -> String -> FilePath -> IO a -> IO ()
base Foreign.C.Error, unix System.Posix.Error
as throwErrnoIf_, but exceptions include the given path when appropriate.
setHeader :: MonadCGI m => String -> String -> m ()
cgi Network.CGI
Add a response header. Example: > setHeader "Content-type" "text/plain"
throwErrnoPathIf :: (a -> Bool) -> String -> FilePath -> IO a -> IO a
base Foreign.C.Error, unix System.Posix.Error
as throwErrnoIf, but exceptions include the given path when appropriate.
throwErrnoPathIfRetry :: (a -> Bool) -> String -> FilePath -> IO a -> IO a
unix System.Posix.Error
throwErrnoPathIfMinus1 :: Num a => String -> FilePath -> IO a -> IO a
base Foreign.C.Error
as throwErrnoIfMinus1, but exceptions include the given path when appropriate.

Show more results