Microsoft SDK for Java

copyFile

The copyFile method of the ClientStore Class contains the following signatures:

copyFile(String curstgfilename, String newstgfilename)
copyFile(String curstgfilename, int curflags, String newstgfilename, int newflags)

copyFile(String curstgfilename, String newstgfilename)

Copies the contents of an existing file to a new file, with the same flags set.

Syntax

public void copyFile(String curstgfilename, String newstgfilename) throws IOException;

Parameters

curstgfilename The name of the file to copy from.
newstgfilename The name of the newly created file.

Exceptions

IOException if either one or the other file name is not valid, if curstgfilename cannot be found, or if either file name is a directory.

copyFile(String curstgfilename, int curflags, String newstgfilename, int newflags)

Copies the contents of an existing files to a new file. If OOPEN_FL_SHARED and OPEN_FL_EXPENDABLE are set for the existing file, the new file will be created with these same flags.

Syntax

public void copyFile(String curstgfilename, int curflags, String newstgfilename, int newflags) thows IOException;



Parameters

curstgfilename The name of the file to copy from.
curflags A value that indicates the storage area in which to find curstgfilename. It can be either or both of the STORE_FL_LOCAL and STORE_FL_ROAMING flags.
newstgfilename The name of the newly created file.
newflags A value that indicates the storage area in which to create newstgfilename. It can be either or both of the following:

STORE_FL_LOCAL
STORE_FL_ROAMING


Exceptions

IOException if either one or the other file name is not valid, if curstgfilename cannot be found, or if either file name is a directory.

© 1999 Microsoft Corporation. All rights reserved. Terms of use.