-- Hoogle documentation, generated by Haddock
-- See Hoogle, http://www.haskell.org/hoogle/


-- | Retrieve information about disk space usage
--   
--   A cross-platform library retrieve information about disk space usage.
@package disk-free-space
@version 0.1.0.1


module System.DiskSpace

-- | Disk usage information. All fields are in bytes.
data DiskUsage
DiskUsage :: Integer -> Integer -> Integer -> Int -> DiskUsage

-- | The total size of the file system.
[diskTotal] :: DiskUsage -> Integer

-- | The amount of free space. You probably want to use <a>diskAvail</a>
--   instead.
[diskFree] :: DiskUsage -> Integer

-- | The amount of space available to the user. Might be less than
--   <a>diskFree</a>. On Windows, this is always equal to <a>diskFree</a>.
--   This is what most tools report as free space (e.g. the unix
--   <tt>df</tt> tool).
[diskAvail] :: DiskUsage -> Integer

-- | The optimal block size for I/O in this volume. Some operating systems
--   report incorrect values for this field.
[blockSize] :: DiskUsage -> Int

-- | Retrieve disk usage information about a volume. The volume is
--   specified with the <tt>FilePath</tt> argument. The path can refer to
--   the root directory or any other directory inside the volume. Unix
--   systems also accept arbitrary files, but this does not work under
--   Windows and therefore should be avoided if portability is desired.
getDiskUsage :: FilePath -> IO DiskUsage

-- | A convenience function that directly returns the <a>diskAvail</a>
--   field from the result of <a>getDiskUsage</a>. If a large amount of
--   data is to be written in a directory, calling this function for that
--   directory can be used to determine whether the operation will fail
--   because of insufficient disk space.
getAvailSpace :: FilePath -> IO Integer
instance GHC.Classes.Eq System.DiskSpace.DiskUsage
instance GHC.Show.Show System.DiskSpace.DiskUsage
