Visit Mozilla.org

XPInstall API Reference:File Object:Methods:copy

From MDC

Contents

[edit] copy

Makes a queued copy of the specified file.

[edit] Method of

File object

[edit] Syntax

int copy( FileSpecObject source, FileSpecObject dest )

[edit] Parameters

The copy method has the following parameters:

source
A FileSpecObject object reprsenting the file to be copied.
dest
A FileSpecObject object representing the destination directory.

[edit] Returns

An integer error code. For a list of possible values, see Return Codes.

[edit] Description

The destination can be a directory or a filename. If destination does not exist a new file will be created.