Solid File System

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

SolFSStorage.SetFileTag method

Filter:

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

SolFSStorage     See also    

Overview

Sets file/stream tag (custom metadata).

Declaration

[Pascal]
    procedure SetFileTag( const FileName: TSolFSString; TagID: word; TagData: Pointer; TagDataSize: LongWord );

[Plain C]
    long _stdcall StorageSetFileTag( unsigned long Storage, const wchar_t* FileName, unsigned short TagID, void* TagData, unsigned long TagDataSize);

[C++ (DLL/Lib)]
    void SetFileTag( unsigned short *fileName, unsigned short TagID, void* TagData, unsigned long TagDataSize);

[C++ (VCL)]
    void __fastcall SetFileTag( const TSolFSString FileName, unsigned short TagID, void* TagData, unsigned long TagDataSize );

[C++ (.NET)]
    void SetFileTag( String *fileName, int TagID, byte TagData __gc[], long TagDataSize );

[C#]
    void SetFileTag( string fileName, int TagID, byte[] TagData, long TagDataSize );

[VB.NET]
    Sub SetFileTag(ByVal fileName As String, TagID As Integer, TagData as Byte(), long TagDataSize)

[Java]
    void setFileTag( String fileName, int tagID, byte[] tagData)

Parameters

  • FileName - the full file name in the SolFSStorage.
  • TagID - tag unique ID, must be in range of [0x8000..0xCFFF].
  • TagData - buffer with tag data.
  • TagDataSize - the size of the buffer.
  • [Plain C] Storage - handle to the storage returned by Create or Open function.

[Plain C]  Return Value

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

Description

Use SeFileTag to set file metadata (custom tag). Each file can have up to 20480 tags. Minimal size of file tag data is 0 bytes, maximal size is PageSize - 48 bytes. File tag can not be split across several pages. Several tags are usually stored in one page if they fit there.

See also

GetFileTag DeleteFileTag

Back to top