diff -r 4816d766a08a -r f345bda72bc4 Symbian3/PDK/Source/GUID-00DE7E90-4C6B-577A-85E1-76698CA2AB69.dita --- a/Symbian3/PDK/Source/GUID-00DE7E90-4C6B-577A-85E1-76698CA2AB69.dita Tue Mar 30 11:42:04 2010 +0100 +++ b/Symbian3/PDK/Source/GUID-00DE7E90-4C6B-577A-85E1-76698CA2AB69.dita Tue Mar 30 11:56:28 2010 +0100 @@ -1,17 +1,31 @@ - - - - - -How to move a file

You can move a single file to a different directory without renaming it, using RFs::Rename().

-// Move file.txt from dir1 to dir2 -_LIT(KFileSource,"\\dir1\\file.txt"); -_LIT(KFileTarget,"\\dir2\\file.txt"); -User::LeaveIfError(fsSession.Rename(KFileTarget,KFileSource)); -
Notes
  • RFs::Replace() can also be used to move a file. The difference between the two functions is that Rename() will return an error if a file with the new name already exists in the target directory whereas Replace() will overwrite it. Another way to move files is to use CFileMan::Move(). This may be used to move multiple files.

\ No newline at end of file + + + + + +How +to move a file This topic describes how to move a single file to a different directory +without renaming it. +

You can move a single file to a different directory without renaming it, +using RFs::Rename().

+ +// Move file.txt from dir1 to dir2 +_LIT(KFileSource,"\\dir1\\file.txt"); +_LIT(KFileTarget,"\\dir2\\file.txt"); +User::LeaveIfError(fsSession.Rename(KFileTarget,KFileSource)); + +
Notes
    +
  • RFs::Replace() can +also be used to move a file. The difference between the two functions is that Rename() will +return an error if a file with the new name already exists in the target directory +whereas Replace() will overwrite it. Another way to move +files is to use CFileMan::Move(). This may be used to move +multiple files.

  • +
+
\ No newline at end of file