improve docs
This commit is contained in:
parent
00352ebe37
commit
170185fb78
2 changed files with 14 additions and 6 deletions
|
@ -31,7 +31,14 @@ fromImportLocation = fromExportLocation
|
||||||
|
|
||||||
{- An identifier for content stored on a remote that has been imported into
|
{- An identifier for content stored on a remote that has been imported into
|
||||||
- the repository. It should be reasonably short since it is stored in the
|
- the repository. It should be reasonably short since it is stored in the
|
||||||
- git-annex branch. -}
|
- git-annex branch.
|
||||||
|
-
|
||||||
|
- Since other things than git-annex can modify files on import remotes,
|
||||||
|
- and git-annex then be used to import those modifications, the
|
||||||
|
- ContentIdentifier needs to change when a file gets changed in such a
|
||||||
|
- way. Device, inode, and size is one example of a good content
|
||||||
|
- identifier. Or a hash if the remote's interface exposes hashes.
|
||||||
|
-}
|
||||||
newtype ContentIdentifier = ContentIdentifier S.ByteString
|
newtype ContentIdentifier = ContentIdentifier S.ByteString
|
||||||
deriving (Eq, Ord, Show, Generic)
|
deriving (Eq, Ord, Show, Generic)
|
||||||
|
|
||||||
|
|
|
@ -113,9 +113,9 @@ data RemoteA a = Remote
|
||||||
-- Some remotes can checkPresent without an expensive network
|
-- Some remotes can checkPresent without an expensive network
|
||||||
-- operation.
|
-- operation.
|
||||||
, checkPresentCheap :: Bool
|
, checkPresentCheap :: Bool
|
||||||
-- Some remotes support export of trees.
|
-- Some remotes support export of trees of files.
|
||||||
, exportActions :: ExportActions a
|
, exportActions :: ExportActions a
|
||||||
-- Some remotes support import of trees.
|
-- Some remotes support import of trees of files.
|
||||||
, importActions :: ImportActions a
|
, importActions :: ImportActions a
|
||||||
-- Some remotes can provide additional details for whereis.
|
-- Some remotes can provide additional details for whereis.
|
||||||
, whereisKey :: Maybe (Key -> a [String])
|
, whereisKey :: Maybe (Key -> a [String])
|
||||||
|
@ -277,8 +277,9 @@ data ImportActions a = ImportActions
|
||||||
-- May also find old versions of files that are still stored in the
|
-- May also find old versions of files that are still stored in the
|
||||||
-- remote.
|
-- remote.
|
||||||
{ listImportableContents :: a (Maybe (ImportableContents (ContentIdentifier, ByteSize)))
|
{ listImportableContents :: a (Maybe (ImportableContents (ContentIdentifier, ByteSize)))
|
||||||
-- Imports a file from the remote, without downloading it,
|
-- Generates a Key (of any type) for the file stored on the
|
||||||
-- by generating a Key (of any type).
|
-- remote at the ImportLocation. Does not download the file
|
||||||
|
-- from the remote.
|
||||||
--
|
--
|
||||||
-- May update the progress meter if it needs to perform an
|
-- May update the progress meter if it needs to perform an
|
||||||
-- expensive operation, such as hashing a local file.
|
-- expensive operation, such as hashing a local file.
|
||||||
|
@ -288,7 +289,7 @@ data ImportActions a = ImportActions
|
||||||
-- since the ContentIdentifier was generated.
|
-- since the ContentIdentifier was generated.
|
||||||
--
|
--
|
||||||
-- Throws exception on failure.
|
-- Throws exception on failure.
|
||||||
, importKey :: Maybe (ExportLocation -> ContentIdentifier -> MeterUpdate -> a Key)
|
, importKey :: Maybe (ImportLocation -> ContentIdentifier -> MeterUpdate -> a Key)
|
||||||
-- Retrieves a file from the remote. Ensures that the file
|
-- Retrieves a file from the remote. Ensures that the file
|
||||||
-- it retrieves has the requested ContentIdentifier.
|
-- it retrieves has the requested ContentIdentifier.
|
||||||
--
|
--
|
||||||
|
|
Loading…
Add table
Reference in a new issue