Net::BitTorrent::Session::File - BitTorrent File I/O Class
new ( { [ARGS] } )
Creates a Net::BitTorrent::Session::File object. This constructor should not be used directly.
Net::BitTorrent::Session::File
index ( )
Returns the zero based index of this file according to the related Net::BitTorrent::Session object's file list.
mode ( )
Returns a value representing if and how the related file handle is open. Possible values:
'ro' - Read only 'wo' - Write only 'rw' - Read and Write undef - Closed
path ( )
Returns the absolute path of the related file.
priority ( )
Returns the download priority of this file.
See also: set_priority ( )
set_priority ( NEWVAL )
Sets the download priority of this file.
By default, all files begin with a level two (2) priority with the intent being on a 0 (skip), 1 (low), 2 (normal), 3 (high) priority scale but you may use any scale you want. For example, you could set a file's priority to say... 1,000,000, leave everything else at the default 2 and and be positive we'll work on it first. To avoid downloading this file, set priority to zero.
0
1
2
3
1,000,000
See also: priority ( )
NOTE: Setting the priority to zero will tell Net::BitTorrrent not to bother requesting these pieces but the file will still be created on disk if a piece we want overlaps onto this file. Just give me some time to work on an intermediate .piece file and this problem will go away.
Net::BitTorrrent
session ( )
Returns the Net::BitTorrent::Session object related to this file.
size ( )
Returns the size of the file represented by this object.
Sanko Robinson <sanko@cpan.org> - http://sankorobinson.com/
CPAN ID: SANKO
Copyright (C) 2008 by Sanko Robinson <sanko@cpan.org>
This program is free software; you can redistribute it and/or modify it under the terms of The Artistic License 2.0. See the LICENSE file included with this distribution or http://www.perlfoundation.org/artistic_license_2_0. For clarification, see http://www.perlfoundation.org/artistic_2_0_notes.
When separated from the distribution, all POD documentation is covered by the Creative Commons Attribution-Share Alike 3.0 License. See http://creativecommons.org/licenses/by-sa/3.0/us/legalcode. For clarification, see http://creativecommons.org/licenses/by-sa/3.0/us/.
Neither this module nor the Author is affiliated with BitTorrent, Inc.
To install Net::BitTorrent, copy and paste the appropriate command in to your terminal.
cpanm
cpanm Net::BitTorrent
CPAN shell
perl -MCPAN -e shell install Net::BitTorrent
For more information on module installation, please visit the detailed CPAN module installation guide.