diff --git a/System/Posix/Files.hsc b/System/Posix/Files.hsc index 4243bc3..6750d55 100644 --- a/System/Posix/Files.hsc +++ b/System/Posix/Files.hsc @@ -242,9 +242,12 @@ access name flags = else throwErrnoPath "fileAccess" name --- | @getFileStatus path@ calls gets the @FileStatus@ information (user ID, +-- | @getFileStatus path@ retrieves the @FileStatus@ information (user ID, -- size, access times, etc.) for the file @path@. -- +-- 'getFileStatus' dereferences symbolic links, to retrieve the status of a symlink +-- use 'getSymbolicLinkStatus' instead. +-- -- Note: calls @stat@. getFileStatus :: FilePath -> IO FileStatus getFileStatus path = do diff --git a/System/Posix/Files/ByteString.hsc b/System/Posix/Files/ByteString.hsc index e9d22e4..656f757 100644 --- a/System/Posix/Files/ByteString.hsc +++ b/System/Posix/Files/ByteString.hsc @@ -240,6 +240,9 @@ access name flags = -- | @getFileStatus path@ calls gets the @FileStatus@ information (user ID, -- size, access times, etc.) for the file @path@. -- +-- 'getFileStatus' dereferences symbolic links, to retrieve the status of a symlink +-- use 'getSymbolicLinkStatus' instead. +-- -- Note: calls @stat@. getFileStatus :: RawFilePath -> IO FileStatus getFileStatus path = do diff --git a/System/Posix/Files/Common.hsc b/System/Posix/Files/Common.hsc index 00ba5be..f73b03f 100644 --- a/System/Posix/Files/Common.hsc +++ b/System/Posix/Files/Common.hsc @@ -507,7 +507,8 @@ isSymbolicLink stat = isSocket stat = (fileMode stat `intersectFileModes` fileTypeModes) == socketMode --- | @getFdStatus fd@ acts as 'getFileStatus' but uses a file descriptor @fd@. +-- | @getFdStatus fd@ is similar to 'getFileStatus', but returns data about +-- the file associated with the descriptor @fd@. -- -- Note: calls @fstat@. getFdStatus :: Fd -> IO FileStatus diff --git a/System/Posix/Files/PosixString.hsc b/System/Posix/Files/PosixString.hsc index 3466f83..a97e2ee 100644 --- a/System/Posix/Files/PosixString.hsc +++ b/System/Posix/Files/PosixString.hsc @@ -239,6 +239,9 @@ access name flags = -- | @getFileStatus path@ calls gets the @FileStatus@ information (user ID, -- size, access times, etc.) for the file @path@. -- +-- 'getFileStatus' dereferences symbolic links, to retrieve the status of a symlink +-- use 'getSymbolicLinkStatus' instead. +-- -- Note: calls @stat@. getFileStatus :: PosixPath -> IO FileStatus getFileStatus path = do