Logo Search packages:      
Sourcecode: virtualbox-ose version File versions

void nsIFile::copyTo ( in nsIFile  newParentDir,
in AString  newName 
) [inherited]


This will copy this file to the specified newParentDir. If a newName is specified, the file will be renamed. If 'this' is not created we will return an error (NS_ERROR_FILE_TARGET_DOES_NOT_EXIST).

copyTo may fail if the file already exists in the destination directory.

copyTo will NOT resolve aliases/shortcuts during the copy.

newParentDir This param is the destination directory. If the newParentDir is null, copyTo() will use the parent directory of this file. If the newParentDir is not empty and is not a directory, an error will be returned (NS_ERROR_FILE_DESTINATION_NOT_DIR). For the |CopyToNative| method, the newName must be in the native filesystem charset.
newName This param allows you to specify a new name for the file to be copied. This param may be empty, in which case the current leaf name will be used.

Generated by  Doxygen 1.6.0   Back to index