Symbian
Symbian Developer Library

SYMBIAN OS V9.4

Feedback

[Index] [Previous] [Next]


How to rename files

[Top]


Using Rename()

The following code fragment does not rename the directory bottomdir, but moves it from directory middledir to topdir:

RFs fs;
...
_LIT(KOldDir,"\\topdir\\middledir\\bottomdir\\");
_LIT(KNewDir,"\\topdir\\bottomdir\\");
...
fs.Rename(KOldDir,KNewDir);

[Top]


Using IsValidName()

When specifying a name, any spaces between the drive, if specified, and the first directory in the path are illegal.

The following code fragment returns false:

...
_LIT(KDirName,"C: \\DIR\\");
TBool bool=fs.IsValidName(KDirName);
...