MissingH-1.6.0.0: Large utility library
CopyrightCopyright (C) 2004-2011 John Goerzen
LicenseBSD-3-Clause
Stabilitystable
Portabilityportable
Safe HaskellTrustworthy
LanguageHaskell2010

System.IO.HVFS.Utils

Description

This module provides various helpful utilities for dealing filesystems.

Written by John Goerzen, jgoerzen@complete.org

To operate on your system's main filesystem, just pass SystemFS as the first parameter to these functions.

Synopsis

Documentation

recurseDir :: HVFS a => a -> FilePath -> IO [FilePath] Source #

Obtain a recursive listing of all files/directories beneath the specified directory. The traversal is depth-first and the original item is always present in the returned list.

If the passed value is not a directory, the return value be only that value.

The "." and ".." entries are removed from the data returned.

recurseDirStat :: HVFS a => a -> FilePath -> IO [(FilePath, HVFSStatEncap)] Source #

Like recurseDir, but return the stat() (System.Posix.Files.FileStatus) information with them. This is an optimization if you will be statting files yourself later.

The items are returned lazily.

WARNING: do not change your current working directory until you have consumed all the items. Doing so could cause strange effects.

Alternatively, you may wish to pass an absolute path to this function.

recursiveRemove :: HVFS a => a -> FilePath -> IO () Source #

Removes a file or a directory. If a directory, also removes all its child files/directories.

lsl :: HVFS a => a -> FilePath -> IO String Source #

Provide a result similar to the command ls -l over a directory.

Known bug: setuid bit semantics are inexact compared with standard ls.

data SystemFS Source #

Constructors

SystemFS 

Instances

Instances details
Eq SystemFS Source # 
Instance details

Defined in System.IO.HVFS

Show SystemFS Source # 
Instance details

Defined in System.IO.HVFS

HVFSOpenable SystemFS Source # 
Instance details

Defined in System.IO.HVFS

HVFS SystemFS Source # 
Instance details

Defined in System.IO.HVFS