|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object org.gudy.azureus2.ui.console.commands.IConsoleCommand org.gudy.azureus2.ui.console.commands.OptionsConsoleCommand org.gudy.azureus2.ui.console.commands.AddFind
public class AddFind
this class allows the user to add and find torrents. when adding, you may specify an output directory when finding, it will cache the files it finds into the ConsoleInput object so that they can then be added by id
Nested Class Summary |
---|
Nested classes/interfaces inherited from class org.gudy.azureus2.ui.console.commands.IConsoleCommand |
---|
IConsoleCommand.TorrentComparator |
Constructor Summary | |
---|---|
AddFind()
|
Method Summary | |
---|---|
protected void |
addFiles(ConsoleInput ci,
File[] toadd,
boolean finding,
String outputDir)
if finding is set, just print the available files and add them to the 'add' list inside the consoleinput object, otherwise actually add the torrents, saving to the specified output directory |
protected void |
addLocal(ConsoleInput ci,
String arg,
String outputDir,
boolean scansubdir,
boolean finding)
attempt a local add (arg may be a directory, a file or a pattern eg: d:/*.torrent) |
protected void |
addRemote(ConsoleInput ci,
String arg,
String outputDir)
attempt to download the torrent specified by 'arg' and save the files in the torrent to the specified output directory |
void |
execute(String commandName,
ConsoleInput ci,
org.apache.commons.cli.CommandLine commands)
execute using the specified command line. |
String |
getCommandDescriptions()
return high-level help about the commands supported by this object. |
protected String |
transformLocalArgument(String arg)
perform any transformations on the argument - in this case we are replacing '~' with the user's home directory. |
Methods inherited from class org.gudy.azureus2.ui.console.commands.OptionsConsoleCommand |
---|
execute, getOptions, getParser, printHelpExtra |
Methods inherited from class org.gudy.azureus2.ui.console.commands.IConsoleCommand |
---|
expandVariable, getCommandName, getCommandNames, getDefaultSummaryFormat, getShortCommandName, getTorrentSummary, printHelp, printHelp |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public AddFind()
Method Detail |
---|
public String getCommandDescriptions()
IConsoleCommand
getCommandDescriptions
in class IConsoleCommand
public void execute(String commandName, ConsoleInput ci, org.apache.commons.cli.CommandLine commands)
OptionsConsoleCommand
execute
in class OptionsConsoleCommand
protected void addRemote(ConsoleInput ci, String arg, String outputDir)
ci
- arg
- URL of torrent to downloadoutputDir
- directory to save files from torrent toprotected void addLocal(ConsoleInput ci, String arg, String outputDir, boolean scansubdir, boolean finding)
ci
- arg
- argument - could be directory, file or pattern eg: d:\*.torrentoutputDir
- directory to save files from torrent toscansubdir
- if true, will recurse subdirectories looking for files to addfinding
- if true, don't start downloading the files; simply add them to the 'found' listprotected String transformLocalArgument(String arg)
arg
-
protected void addFiles(ConsoleInput ci, File[] toadd, boolean finding, String outputDir)
toadd
- finding
- outputDir
-
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |