Visit Mozilla.org

nsIFile:copyToFollowingLinksNative

From MDC

« XPCOM API Reference

Contents

[edit] Summary

This method copies this file to a new location. [native character encoding variant]

 [noscript] void copyToFollowingLinksNative(
   in nsIFile aParentDir,
   in ACString 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. This string must be encoded using the native character encoding.

[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 copyToNative except that any symbolic links will be followed as the name suggests.

[edit] See Also

copyToNative