Solid File System

Virtual file system enigne that can be embedded into your software.

SolFSStorage.DeleteAndRenameFile method


Pascal    Plain C    C++ (DLL/Lib)    C++ (VCL)    C++ (.NET)    C#    VB.NET    Java 

SolFSStorage     See also    


Renames or moves file or folder inside one SolFS storage, deleting the previous file.


    procedure DeleteAndRenameFile(OldFileName: TSolFSString; NewFileName: TSolFSString);
    type TSolFSString = {$ifdef UNICODE}UnicodeString{$else}WideString{$endif};

[Plain C]
    long _stdcall StorageDeleteAndRenameFile(unsigned long Storage, const wchar_t* OldFileName, const wchar_t* NewFileName);

[C++ (DLL/Lib)]
    void DeleteAndRenameFile(unsigned short * OldFileName, unsigned short * NewFileName);

[C++ (VCL)]
    void __fastcall DeleteAndRenameFile(TSolFSString OldFileName, TSolFSString NewFileName);

[C++ (.NET)]
    void DeleteAndRenameFile(String* oldFileName, String* newFileName)

    void DeleteAndRenameFile(string oldFileName, string newFileName)

    Sub DeleteAndRenameFile(oldFileName As String, newFileName As String)

    void deleteAndRenameFile(String oldFileName, String newFileName);


  • [Plain C] Storage - handle to the storage returned by Create or Open function.
  • OldFileName - old file name (full path must be specified).
  • NewFileName - new file name (full path must be specified).

[Plain C]  Return values

0 if the function succeeded or one of Error codes if the function failed.


Use DeleteAndRenameFile function to rename file or folder or move it from one place in the storage to another. The method deletes previously existing file with the name NewFileName, if such file is present. The operation is performed atomically, i.e. it will fail if either delete or rename/move operation fails.

See also

DeleteFile     MoveFile    

Back to top