How to create directories

This topic describes how to create directories.

To create a new directory, use RFs::MkDir().

_LIT(KNewDir,"\\FileServerExample\\NewDir\\");
User::LeaveIfError(fsSession.MkDir(KNewDir));

Note:

  • When a file or directory name is passed as an argument to MkDir(), if either or both of the drive letter or parent directory is omitted, the missing component will be taken from the session path. Here, the drive letter is taken from the session path.

  • In most directory-related functions in class RFs, including MkDir(), if a file is specified at the end of the path, it will be ignored. Therefore, a backslash should be included after the final directory name in order to indicate that it is a directory.