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 |
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 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; |
Types
TFileInfoList = specialize TStructList<TFileInfo>; |
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; |
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 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 |
Types
TFileInfoList = specialize TStructList<TFileInfo>; |
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; |
TFindFilesOption = (...); |
Values
|
TFindFilesOptions = set of TFindFilesOption; |
Generated by PasDoc 0.16.0.