977403d338
Only gcrypt remains to add support for. (Well, possibly also adb?) Sponsored-by: Luke T. Shumaker on Patreon
19 lines
493 B
Haskell
19 lines
493 B
Haskell
{- Utilities for remotes located in a path in the filesystem.
|
|
-
|
|
- Copyright 2023 Joey Hess <id@joeyh.name>
|
|
-
|
|
- Licensed under the GNU AGPL version 3 or higher.
|
|
-}
|
|
|
|
module Remote.Helper.Path where
|
|
|
|
import Annex.Common
|
|
import Types.Availability
|
|
|
|
checkPathAvailability :: Bool -> FilePath -> Annex Availability
|
|
checkPathAvailability islocal d
|
|
| not islocal = return GloballyAvailable
|
|
| otherwise = ifM (liftIO $ doesDirectoryExist d)
|
|
( return LocallyAvailable
|
|
, return Unavailable
|
|
)
|