Solid File System

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

SolFSStorage.FindByQueryFirst method

Filter:

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

SolFSStorage     See also    

Overview

Searches for the first instance of a file which tags satisfy a query.

Declaration

[Pascal]
    function FindByQueryFirst(var Search: TStorageSearch; const Directory: TSolFSString; const Query: TSolFSString; Flags: LongWord): Boolean;

[Plain C]
    long _stdcall StorageFindByQueryFirst( Handle Storage, PWideChar Directory, PStorageSearch Search, PWideChar Query, LongWord Flags);

[C++ (DLL/Lib)]
    bool FindByQueryFirst( TStorageSearch &Search, const PWideChar Directory, const PWideChar Query, long Flags)

[C++ (VCL)]
    bool __fastcall FindByQueryFirst( TStorageSearch &Search, const TSolFSString Directory, const TSolFSString Query, unsigned Flags);

[C++ (.NET)]
    bool FindByQueryFirst( String *directory, String *query, long flags, TStorageSearch & search )

[C#]
    bool FindByQueryFirst( string directory, string query, uint flags, ref SolFS.StorageSearch search )

[VB.NET]
    Function FindByQueryFirst( ByVal directory As String, ByVal query As String, ByVal flags As UInt32, ByRef search As SolFS.StorageSearch ) As Boolean

[Java]
    boolean findByQueryFirst( SolFSStorageSearch search, String directory, String query, SearchQueryFlags flags );

Parameters

  • Directory - search directory.
  • Query - search query.
  • Flags - search flags.
  • Search - on return contains the structure with search result
  • [Plain C] Storage - handle to the storage returned by Create or Open function.

Values of Flags

Return value

    True if a file was successfully located.
    False if no files have been found.
     [Java]  the structure with search result.
     [Plain C]  0 if the function succeeded or one of Error codes if the function failed.

Description

FindByQueryFirst searches the directory specified by Directory using file metadata (tags), for the first file that matches the Query. When you finish enumeration, remember to call FindByQueryClose. Calling this method is not necessary, if FindByQueryFirst returned False ([DLL] "errNoMoreFiles" error code).

See also

Files and streams     Using query language     FindFirst     FindByQueryNext     FindByQueryClose

Back to top