Stability | provisional |
---|---|
Portability | portable |
Safe Haskell | None |
Language | Haskell2010 |
Documentation
Disk usage information. All fields are in bytes.
DiskUsage | |
|
getDiskUsage :: FilePath -> IO DiskUsage Source
Retrieve disk usage information about a volume. The volume is
specified with the FilePath
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.
getAvailSpace :: FilePath -> IO Integer Source
A convenience function that directly returns the diskAvail
field from
the result of getDiskUsage
. 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.