diff options
Diffstat (limited to 'Utility')
-rw-r--r-- | Utility/FileMode.hs | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/Utility/FileMode.hs b/Utility/FileMode.hs index f5b018c84..6c1c06e82 100644 --- a/Utility/FileMode.hs +++ b/Utility/FileMode.hs @@ -30,3 +30,7 @@ allowWrite :: FilePath -> IO () allowWrite f = do s <- getFileStatus f setFileMode f $ fileMode s `unionFileModes` ownerWriteMode + +{- Checks if a file mode indicates it's a symlink. -} +isSymLink :: FileMode -> Bool +isSymLink mode = symbolicLinkMode `intersectFileModes` mode == symbolicLinkMode |