Visit Mozilla.org

nsIFile:copyToFollowingLinks

From MDC

« XPCOM API Reference

Contents

[edit] Summary

This method copies this file to a new location.

 void copyToFollowingLinks(
   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 empty, 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.

This method is identical to copyTo except that any symbolic links will be followed as the name suggests.

[edit] See Also

copyTo