Solid File System

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

SolFSStorage.GetFileTag method


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

SolFSStorage     See also    


Returns file/stream tag (custom metadata).


    function GetFileTag( const FileName: TSolFSString; TagID: word; TagData: Pointer; TagDataSize: LongWord) : LongWord;

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

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

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

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

    int GetFileTag( String fileName, int TagID, byte[] TagData, long TagDataSize );

    Function GetFileTag(ByVal fileName As String, TagID As Integer, TagData as Byte(), TagDataSize as Integer ) As Integer

    byte[] getFileTag( String fileName, int tagID)


  • FileName - the full file name in the SolFSStorage.
  • TagID - tag unique ID, must be in range of [0x8000..0xCFFF].
  • TagData - a buffer for tag data, which is to be retrieved.
  • TagDataSize - on entry contains the size of the buffer. [Plain C]On exit contains tag data real size
  • [Plain C] Storage - handle to the storage returned by Create or Open function.

Return value

Tag data real size.

     [Plain C]  0 if the function succeeded or one of Error codes if the function failed.


Use GeFileTag to retrieve file metadata (custom tag). Each file can have up to 20480 tags distinguished by their IDs. Each tag data can be as large as (PageSize - 48) bytes.

See also

SetFileTag DeleteFileTag

Back to top