BatchFileRename
public class BatchFileRename
Field Summary | |
---|---|
BatchFileRenameOptionsFileSet | Contains the configuration options of the files that will be renamed. |
BatchFileRenameOptionsBase | Contains the main BatchFileRename configuration options. |
BatchFileRenameOptionsRenameRules | Contains the renaming rules which the files will be renamed according to it. |
Constructor Summary | |
---|---|
void | __construct(array options, array fileSetOptions, array renameRules) Constructor for initializing the class with default values. |
Method Summary | |
---|---|
void | setOptions(array options) Sets the main configuration options. |
void | setFileSetOptions(array fileSetOptions) Sets the FileSet configuration options. |
void | setRenameRules(array renameRules) Sets the RenameRules configuration options. |
void | setFileNameVariable(string variableName, callback variableCallback) Sets a filename Variable. |
void | rename() Used to execute the renaming process. |
void | renameFromLogFile(string logfile, bool reverse) Used to rename files based on a previusly created log file. |
void | createLogFile(string logfile) Creates a log file contains the successfully renamed files and their original names, the log file may be used later to restore the renamed files to their original names by passing the log file back to the renameFromLogFile() method. |
array | Returns an array containing the successfully renamed files. |
array | Returns an array containing the files that were not ranamed and the error message. |
bool | isError() Checks if some files were not renamed during the renaming process as a result of such error. |
public BatchFileRenameOptionsFileSet $fileSetOptions
Contains the configuration options of the files that will be renamed.
public BatchFileRenameOptionsBase $options
Contains the main BatchFileRename configuration options.
public BatchFileRenameOptionsRenameRules $renameRules
Contains the renaming rules which the files will be renamed according to it.
public void __construct(array options, array fileSetOptions, array renameRules)
Constructor for initializing the class with default values.
public void setOptions(array options)
Sets the main configuration options.
public void setFileSetOptions(array fileSetOptions)
Sets the FileSet configuration options.
public void setRenameRules(array renameRules)
Sets the RenameRules configuration options.
public void setFileNameVariable(string variableName, callback variableCallback)
Sets a filename Variable.
public void rename()
Used to execute the renaming process.
public void renameFromLogFile(string logfile, bool reverse)
Used to rename files based on a previusly created log file.
public void createLogFile(string logfile)
Creates a log file contains the successfully renamed files and their original names, the log file may be used later to restore the renamed files to their original names by passing the log file back to the renameFromLogFile() method.
public array getResultArray()
Returns an array containing the successfully renamed files.
public array getErrorsArray()
Returns an array containing the files that were not ranamed and the error message.
public bool isError()
Checks if some files were not renamed during the renaming process as a result of such error.
The main BatchFileRename class.