diff --git a/unliftio/ChangeLog.md b/unliftio/ChangeLog.md index b4bebb0..acac4c6 100644 --- a/unliftio/ChangeLog.md +++ b/unliftio/ChangeLog.md @@ -1,5 +1,13 @@ # Changelog for unliftio +## 0.2.21.0 + +* Add `UnliftIO.Directory.createDirectoryLink` +* Add `UnliftIO.Directory.removeDirectoryLink` +* Add `UnliftIO.Directory.getSymbolicLinkTarget` +* Add `UnliftIO.Directory.XdgDirectoryList` +* Add `UnliftIO.Directory.getXdgDirectoryList` + ## 0.2.20.1 * Fix time-osx.c for aarch64 mac [#91](https://github.com/fpco/unliftio/pull/91) diff --git a/unliftio/package.yaml b/unliftio/package.yaml index 54c5325..dd9cdd8 100644 --- a/unliftio/package.yaml +++ b/unliftio/package.yaml @@ -1,5 +1,5 @@ name: unliftio -version: 0.2.20.1 +version: 0.2.21.0 synopsis: The MonadUnliftIO typeclass for unlifting monads to IO (batteries included) description: Please see the documentation and README at homepage: https://github.com/fpco/unliftio/tree/master/unliftio#readme diff --git a/unliftio/src/UnliftIO/Directory.hs b/unliftio/src/UnliftIO/Directory.hs index d6ce96d..a6b52f2 100644 --- a/unliftio/src/UnliftIO/Directory.hs +++ b/unliftio/src/UnliftIO/Directory.hs @@ -9,6 +9,9 @@ module UnliftIO.Directory ( , createDirectoryIfMissing #if MIN_VERSION_directory(1,3,1) , createFileLink + , createDirectoryLink + , removeDirectoryLink + , getSymbolicLinkTarget #endif , removeDirectory , removeDirectoryRecursive @@ -33,6 +36,10 @@ module UnliftIO.Directory ( #if MIN_VERSION_directory(1,2,3) , XdgDirectory(..) , getXdgDirectory +#endif +#if MIN_VERSION_directory(1,3,2) + , XdgDirectoryList(..) + , getXdgDirectoryList #endif , getAppUserDataDirectory , getUserDocumentsDirectory @@ -122,6 +129,9 @@ import System.Directory ( Permissions #if MIN_VERSION_directory(1,2,3) , XdgDirectory(..) +#endif +#if MIN_VERSION_directory(1,3,2) + , XdgDirectoryList(..) #endif , emptyPermissions #if MIN_VERSION_directory(1,2,4) @@ -164,6 +174,27 @@ createFileLink -> m () createFileLink targetPath linkPath = liftIO (D.createFileLink targetPath linkPath) + +-- | Lifted 'D.createDirectoryLink'. +-- +-- @since 0.2.21.0 +createDirectoryLink :: MonadIO m => FilePath -> FilePath -> m () +createDirectoryLink targetPath linkPath = + liftIO (D.createDirectoryLink targetPath linkPath) + +-- | Lifted 'D.removeDirectoryLink'. +-- +-- @since 0.2.21.0 +removeDirectoryLink :: MonadIO m => FilePath -> m () +removeDirectoryLink linkPath = + liftIO (D.removeDirectoryLink linkPath) + +-- | Lifted 'D.getSymbolicLinkTarget'. +-- +-- @since 0.2.21.0 +getSymbolicLinkTarget :: MonadIO m => FilePath -> m FilePath +getSymbolicLinkTarget linkPath = + liftIO (D.getSymbolicLinkTarget linkPath) #endif -- | Lifted 'D.removeDirectory'. @@ -252,6 +283,15 @@ getXdgDirectory :: MonadIO m => XdgDirectory -> FilePath -> m FilePath getXdgDirectory xdgDir suffix = liftIO (D.getXdgDirectory xdgDir suffix) #endif +#if MIN_VERSION_directory(1,3,2) +-- | Lifted 'D.getXdgDirectoryList'. +-- +-- @since 0.2.21.0 +getXdgDirectoryList :: MonadIO m => XdgDirectoryList -> m [FilePath] +getXdgDirectoryList xdgDirectoryList = + liftIO (D.getXdgDirectoryList xdgDirectoryList) +#endif + -- | Lifted 'D.getAppUserDataDirectory'. -- -- @since 0.2.6.0