Copyright | (c) Kai Lindholm, 2014 |
---|---|
License | MIT |
Maintainer | megantti@gmail.com |
Stability | experimental |
Safe Haskell | None |
Language | Haskell2010 |
For more info on actions, see Network.RTorrent.Action.
- data FileId = FileId !TorrentId !Int
- data FileInfo = FileInfo {
- filePath :: String
- fileSizeBytes :: !Int
- fileSizeChunks :: !Int
- fileCompletedChunks :: !Int
- filePriority :: !FilePriority
- fileOffset :: !Int
- fileId :: FileId
- type FileAction = Action FileId
- getFilePartial :: FileId -> FileAction (FileId -> FileInfo)
- getTorrentFiles :: TorrentId -> TorrentAction [FileInfo]
- allFiles :: (FileId -> FileAction a) -> TorrentId -> TorrentAction [FileId :*: a]
- getFilePath :: FileId -> FileAction String
- getFileAbsolutePath :: FileId -> FileAction String
- getFileSizeBytes :: FileId -> FileAction Int
- getFileSizeChunks :: FileId -> FileAction Int
- getFileCompletedChunks :: FileId -> FileAction Int
- getFilePriority :: FileId -> FileAction FilePriority
- setFilePriority :: FilePriority -> FileId -> FileAction Int
- getFileOffset :: FileId -> FileAction Int
Documentation
FileInfo | |
|
type FileAction = Action FileId Source
getFilePartial :: FileId -> FileAction (FileId -> FileInfo) Source
Get a file except for FileId
. The FileId
can be got by running allFiles
.
allFiles :: (FileId -> FileAction a) -> TorrentId -> TorrentAction [FileId :*: a] Source
Run the file action on all files that a torrent has.
Functions dealing with a single variable
getFilePath :: FileId -> FileAction String Source
Get the file name relative to the torrent base directory.
getFileAbsolutePath :: FileId -> FileAction String Source
Get the absolute path.
setFilePriority :: FilePriority -> FileId -> FileAction Int Source
getFileOffset :: FileId -> FileAction Int Source
Get the offset of a file in a torrent, when chunks are interpreted as continuous data.