BoxedAppSDK_DeleteFileFromVirtualFileSystem

Description

The function deletes a file from the virtual file system.

If the file is real, it is simply marked as deleted.
If the file is virtual, the function completely removes it from the virtual environment, including any metadata describing its behavior.

It is important to note the difference between this function and the standard WinAPI function DeleteFile.
When a virtual file is deleted via DeleteFile, it is only marked as deleted, not actually removed.
This design allows the system to preserve information about the file’s creation mechanism for when it is recreated later.

For example:

  • Suppose a virtual file was originally created using BoxedAppSDK_CreateVirtualFileBasedOnIStream.
  • If the file is deleted using DeleteFile and then recreated with the same name, its behavior will again be determined by the same IStream implementation.
  • However, if you call BoxedAppSDK_DeleteFileFromVirtualFileSystem, all information about its virtual behavior is erased.
    A new file created under that name afterward will behave as a real file.

Thus, BoxedAppSDK_DeleteFileFromVirtualFileSystem permanently removes the file from the virtual file system and deletes its associated metadata.

Syntax

BOOL __stdcall BoxedAppSDK_DeleteFileFromVirtualFileSystem(LPCTSTR szPath);
function BoxedAppSDK_DeleteFileFromVirtualFileSystem(szPath: PAnsiChar): Boolean; stdcall;
function BoxedAppSDK_DeleteFileFromVirtualFileSystemA(szPath: PAnsiChar): Boolean; stdcall;
function BoxedAppSDK_DeleteFileFromVirtualFileSystemW(szPath: PWideChar): Boolean; stdcall;

Parameters

szPath
Specifies the name (relative or full path) of the file to be deleted from the virtual file system.

See Also