Unit CastleFindFiles
Description
Finding files matching some mask.
Uses
- SysUtils
- Classes
- Generics.Collections
- DOM
- CastleUtils
Overview
Classes, Interfaces, Objects and Records
Name | Description |
---|---|
Record TFileInfo |
Information about a single file or directory collected by FindFiles. |
Class TFileInfoList |
Returned by FindFilesList. |
Functions and Procedures
function FindFiles(const Path, Mask: string; const FindDirectories: boolean; const FileMethod: TFoundFileMethod; const Options: TFindFilesOptions): Cardinal; overload; |
function FindFiles(const Path, Mask: string; const FindDirectories: boolean; const FileProc: TFoundFileProc; const FileProcData: Pointer; const Options: TFindFilesOptions): Cardinal; overload; |
function FindFiles(const PathAndMask: string; const FindDirectories: boolean; const FileMethod: TFoundFileMethod; const Options: TFindFilesOptions): Cardinal; overload; |
function FindFiles(const PathAndMask: string; const FindDirectories: boolean; const FileProc: TFoundFileProc; const FileProcData: Pointer; const Options: TFindFilesOptions): Cardinal; overload; |
function FindFilesList(const Path, Mask: string; const FindDirectories: boolean; const Options: TFindFilesOptions): TFileInfoList; |
function SearchFileHard(Path: string; const Base: string; out NewBase: string): boolean; |
function FindFirstFile(const Path, Mask: string; const FindDirectories: boolean; const Options: TFindFilesOptions; out FileInfo: TFileInfo): boolean; |
function FindFirstFileIgnoreCase(const Path, Mask: string; const FindDirectories: boolean; const Options: TFindFilesOptions; out FileInfo: TFileInfo): boolean; |
Types
TFoundFileProc = procedure (const FileInfo: TFileInfo; Data: Pointer; var StopSearch: Boolean); |
TFoundFileMethod = procedure (const FileInfo: TFileInfo; var StopSearch: Boolean) of object; |
TFindFilesOption = (...); |
TFindFilesOptions = set of TFindFilesOption; |
Description
Functions and Procedures
function FindFiles(const Path, Mask: string; const FindDirectories: boolean; const FileMethod: TFoundFileMethod; const Options: TFindFilesOptions): Cardinal; overload; |
Find all files matching the given mask, and call FileProc for them.
Parameters
ReturnsHow many times FileProc was called, that is: how many files/directories were matching. Useful to report to user how many files were processed, in particular to warn if nothing was processed. |
function FindFiles(const Path, Mask: string; const FindDirectories: boolean; const FileProc: TFoundFileProc; const FileProcData: Pointer; const Options: TFindFilesOptions): Cardinal; overload; |
This item has no description. |
function FindFiles(const PathAndMask: string; const FindDirectories: boolean; const FileMethod: TFoundFileMethod; const Options: TFindFilesOptions): Cardinal; overload; |
This item has no description. |
function FindFiles(const PathAndMask: string; const FindDirectories: boolean; const FileProc: TFoundFileProc; const FileProcData: Pointer; const Options: TFindFilesOptions): Cardinal; overload; |
This item has no description. |
function FindFilesList(const Path, Mask: string; const FindDirectories: boolean; const Options: TFindFilesOptions): TFileInfoList; |
Like FindFiles, but return found files as a list. Caller is resopnsible for freeing the returned list. |
function SearchFileHard(Path: string; const Base: string; out NewBase: string): boolean; |
Search for a file, ignoring the case. Path must be absolute URL and contain the final slash. Returns URL relative to Path. We prefer to return just Base, if it exists, or when no alternative exists. When Base doesn't exist but some likely alternative exists (e.g. with different case), we return it. Looks for normal files/symlinks, that can be opened as usual files. Not directories. Returns if some file was found. Note that even when we return |
function FindFirstFile(const Path, Mask: string; const FindDirectories: boolean; const Options: TFindFilesOptions; out FileInfo: TFileInfo): boolean; |
Find first file matching given Mask inside Path. If found, returns |
function FindFirstFileIgnoreCase(const Path, Mask: string; const FindDirectories: boolean; const Options: TFindFilesOptions; out FileInfo: TFileInfo): boolean; |
Find first file matching given Mask inside Path, always ignores case (regardless of OS conventions). If found, returns |
Types
TFoundFileProc = procedure (const FileInfo: TFileInfo; Data: Pointer; var StopSearch: Boolean); |
Called for each file found. StopSearch is always initially |
TFoundFileMethod = procedure (const FileInfo: TFileInfo; var StopSearch: Boolean) of object; |
This item has no description. |
TFindFilesOption = (...); |
This item has no description. Values
|
TFindFilesOptions = set of TFindFilesOption; |
This item has no description. |
Generated by PasDoc 0.16.0-snapshot.