nsIFile:copyTo
From MDC
Contents |
[edit] Summary
This method copies this file to a new location.
void copyTo( in nsIFile aParentDir, in AString aName );
[edit] Parameters
- aParentDir
- [in] This parameter specifies the parent directory to copy the file into. If this parameter is null, then the parent directory of the file will be used.
- aName
- [in] This parameter specifies the leaf name of the target of the file copy. This parameter may be the empty string (""), in which case the current leaf name will be used.
[edit] Exceptions Thrown
NS_ERROR_FILE_TARGET_DOES_NOT_EXIST - Indicates that the current file path does not exist. It is not possible to copy a file that does not exist.
[edit] Remarks
This method may fail if the file already exists in the destination directory.