Document ConfigDir

This commit is contained in:
Matt Joiner 2015-06-22 19:48:50 +10:00
parent ad6fec2e77
commit b5ee4f602d
2 changed files with 11 additions and 0 deletions

View File

@ -336,6 +336,8 @@ func (cl *Client) configDir() string {
return cl.config.ConfigDir return cl.config.ConfigDir
} }
// The directory where the Client expects to find and store configuration
// data. Defaults to $HOME/.config/torrent.
func (cl *Client) ConfigDir() string { func (cl *Client) ConfigDir() string {
return cl.configDir() return cl.configDir()
} }

9
doc.go
View File

@ -14,5 +14,14 @@ BitTorrent features implemented include:
* Some IPv6 * Some IPv6
* UDP Trackers * UDP Trackers
ConfigDir
A Client has a configurable ConfigDir that defaults to $HOME/.config/torrent.
Torrent metainfo files are cached at $CONFIGDIR/torrents/$infohash.torrent.
Infohashes in $CONFIGDIR/banned_infohashes cannot be added to the Client. A
P2P Plaintext Format blocklist is loaded from a file at the location specified
by the environment variable TORRENT_BLOCKLIST_FILE if set, otherwise from
$CONFIGDIR/blocklist.
*/ */
package torrent package torrent