Microsoft SDK for Java

renameFile

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

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

renameFile(String curstgfilename, String newstgfilename)

Gives an existing file a new name, possibly moving it to a new directory.

Syntax

public void renameFile(String curstgfilename, String newstgfilename) throws IException;

Parameters

curstgfilename The file to rename.
newstgfilename The new name of the file.

Exceptions

Throws IOException if any one of the following is true:

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

Renames and assigns new flags to an existing file.

Syntax

public void renameFile(String curstgfilename, int curflags, String newstgfilename, int newflags) throw IOException;

Parameters

curstgfilename The file to rename.
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 new name of the file.
newflags The new flags that are set for the file. This value can be any combination of the following:

STORE_FL_LOCAL
STORE_FL_ROAMING
OPEN_FL_EXPENDABLE


Exceptions

IOException if one of the following is true:

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