From: Marcel B. <jed...@us...> - 2002-08-10 18:56:00
|
Update of /cvsroot/jvcl/dev/help In directory usw-pr-cvs1:/tmp/cvs-serv28666/dev/help Added Files: JvSearchFiles.dtx JvSysComp.dtx Log Message: Oops, missed these when moving (note to self: update first, move later!) --- NEW FILE: JvSearchFiles.dtx --- ---------------------------------------------------------------------------------------------------- @@$TJvSearchFiles <TITLE TJvSearchFiles overview> <GROUP JVCL.Miscel> Use TJvSearchFiles to perform a search operation for files and directories. To search for files whose names starts with 'Jv' in the directory 'C:\Source\' and it's sub-directories, do the following: * Include soSearchFiles in Options. Exclude soSearchDirs from Options. * Set DirOption to doIncludeSubDirs. * Add 'Jv*' to the mask list <LINK TJvSearchParams.FileMasks,FileMasks> of FileParams. * Include stFileMask in <LINK TJvSearchParams.SearchType,FileParams.SearchType>. * Set RootDirectory to 'C:\Source\'. * Call Search. To search for all read-only directories, created after '1-1-2000' on drive C:, do the following: * Include soSearchDirs in Options. Exclude soSearchFiles from Options. * Set DirOption to doIncludeSubDirs. * Set <LINK TJvAttributes.ReadOnly,DirParams.Attributes.ReadOnly> to tsMustBeSet. * Set <LINK TJvSearchParams.LastChangeAfter,DirParams.LastChangeAfter> to '1-1-2000'. * Include stAttribute and stLastChangeAfter in <LINK TJvSearchParams.SearchType,DirParams.SearchType>. * Set RootDirectory to 'C:\'. * Call Search. To search for all temporary or archive files with a minimal file size of 1000000 bytes in the encrypted sub-directories of 'C:\temp\dir\', with directory name 'test' or 'dummy', do the following: * Include soSearchFiles in Options. Exclude soSearchDirs from Options. * Set DirOption to doExcludeInvalidDirs. * Set DirParams.Attributes.Encrypted to tsMustBeSet. * Add 'test' and 'dummy' to the mask list FileMasks of DirParams. * Include stAttribute and stFileMask in DirParams.SearchType. * Set the <LINK TJvAttributes.ReadOnly,ReadOnly>, <LINK TJvAttributes.Hidden,Hidden>, <LINK TJvAttributes.System,System>, <LINK TJvAttributes.Normal,Normal>, <LINK TJvAttributes.SparseFile, SparseFile>, <LINK TJvAttributes.ReparsePoint,ReparsePoint>, <LINK TJvAttributes.Compressed, Compressed>, <LINK TJvAttributes.OffLine,OffLine>, <LINK TJvAttributes.NotContentIndexed, NotContentIndexed> and <LINK TJvAttributes.Encrypted,Encrypted> properties of <LINK TJvAttributes,FileParams.Attributes> to tsMustBeUnset and set <LINK TJvAttributes.Archive,Archive> and <LINK TJvAttributes.Temporary,Temporary> to tsDontCare. Or alternatively set <LINK TJvSearchParams.ExcludeAttr,FileParams.ExcludeAttr> to not (FILE_ATTRIBUTE_TEMPORARY or FILE_ATTRIBUTE_ARCHIVE), and <LINK TJvSearchParams.IncludeAttr, FileParams.IncludeAttr> to 0. * Set <LINK TJvSearchParams.MinSize,FileParams.MinSize> to 1000000. * Include stAttribute and stMinSize in <LINK TJvSearchParams.SearchType,FileParams.SearchType>. * Set RootDirectory to 'C:\temp\dir\'. * Include soExcludeFilesInRootDir in Options. * Call Search. ---------------------------------------------------------------------------------------------------- @@JvSearchFiles.pas Summary Contains the TJvSearchFiles component. <INCLUDE JVCL.UnitText.dtx> Author Peter Thörnqvist ---------------------------------------------------------------------------------------------------- @@TJvAttrFlagKind Summary Indicates whether files or directories must have a specific file attribute set or unset for it to be included in the search result. Description @@TJvAttrFlagKind.tsMustBeSet The attribute must be set for files or directories to be included in the search result. @@TJvAttrFlagKind.tsDontCare The attribute may or may not be set for files or directories to be included in the search result. @@TJvAttrFlagKind.tsMustBeUnSet The attribute must <i>not</i> be set for files or directories to be included in the search result. ---------------------------------------------------------------------------------------------------- @@TJvDirOption Summary Determines the kind of search. Description @@TJvDirOption.doExcludeSubDirs Only searches for files or directories in the directory specified by RootDirectory. @@TJvDirOption.doIncludeSubDirs Searches in the directory specified by RootDirectory and it's sub-directories. @@TJvDirOption.doExcludeInvalidDirs Searches in RootDirectory and it's sub-directories, but doesn't search for files or directories in invalid - as specified by DirParams - directories. However, the component will search in sub-directories of invalid directories. @@TJvDirOption.doExcludeInvalidSubDirs Searches in RootDirectory and it's sub-directories, but doesn't search for files or directories in invalid - as specified by DirParams - directories, and the sub-directories of an invalid directory. ---------------------------------------------------------------------------------------------------- @@TJvErrorResponse Summary Specifies how a TJvSearchFiles component should react on errors. Description The TJvErrorResponse type defines values describing the reaction of a TJvSearchFiles component on errors. TJvErrorResponse can have any of the following values: @@TJvErrorResponse.erAbort Abort the entire search operation; Search will return with result False. @@TJvErrorResponse.erIgnore Abort the search operation in the directory where the error occurred, and continue in the next. @@TJvErrorResponse.erRaise Raise a system error. ---------------------------------------------------------------------------------------------------- @@TJvSearchAttributes <GROUP TJvSearchFiles> Summary Represents an attribute filter for files and directories. Description TJvSearchParams uses the TJvSearchAttributes object to limit the search result to files and directories whose attributes match with the values described by TJvSearchAttributes. Use IncludeAttr at run-time to specify the attributes that must be set for files and directories to be included in the search result. Use ExcludeAttr at run-time to specify the attributes that must <i>not</i> be set for files and directories to be included in the search result. Use the other properties to specify per attribute whether it must be included, must not be included, or may be included. Include stAttribute in <LINK TJvSeachParams.SeachType,SearchType> to actually limit the search result. ---------------------------------------------------------------------------------------------------- @@TJvSearchAttributes.Archive Summary Specifies whether archive files or directories must be included in the search result. Description Set Archive to tsMustBeSet to only include archive files or directories in the search result. Set Archive to tsMustBeUnSet to exclude these files or directories. If Archive is set to tsDontCare then archive files or directories aren't excluded in the search result. Include stAttribute in <LINK TJvSeachParams.SeachType,SearchType> to actually limit the search result. See Also Compressed, Encrypted, Hidden, Normal, NotContentIndexed, OffLine, ReadOnly, ReparsePoint, SparseFile, System, Temporary ---------------------------------------------------------------------------------------------------- @@TJvSearchAttributes.Compressed Summary Specifies whether compressed files or directories must be included in the search result. Description Set Compressed to tsMustBeSet to only include compressed files or directories in the search result. Set Compressed to tsMustBeUnSet to exclude these files or directories. If Compressed is set to tsDontCare then compressed files or directories aren't excluded in the search result. Include stAttribute in <LINK TJvSeachParams.SeachType,SearchType> to actually limit the search result. See Also Archive, Encrypted, Hidden, Normal, NotContentIndexed, OffLine, ReadOnly, ReparsePoint, SparseFile, System, Temporary ---------------------------------------------------------------------------------------------------- @@TJvSearchAttributes.Encrypted Summary Specifies whether encrypted files or directories must be included in the search result. Description Set Encrypted to tsMustBeSet to only include encrypted files or directories in the search result. Set Encrypted to tsMustBeUnSet to exclude these files or directories. If Encrypted is set to tsDontCare then encrypted files or directories aren't excluded in the search result. Include stAttribute in <LINK TJvSeachParams.SeachType,SearchType> to actually limit the search result. See Also Archive, Compressed, Hidden, Normal, NotContentIndexed, OffLine, ReadOnly, ReparsePoint, SparseFile, System, Temporary ---------------------------------------------------------------------------------------------------- @@TJvSearchAttributes.ExcludeAttr Summary Specifies the attributes that must not be set for files and directories to be included in the search result. Description Read ExcludeAttr to determine the attributes of a file or directory that must not be set, for it to be included in the search result. Set ExcludeAttr to specify the exclude attributes at once. Use the other properties of TJvSearchAttributes to specify the exclude attributes per attribute. Include stAttribute in <LINK TJvSeachParams.SeachType,SearchType> to actually limit the search result. See Also IncludeAttr ---------------------------------------------------------------------------------------------------- @@TJvSearchAttributes.Hidden Summary Specifies whether hidden files or directories must be included in the search result. Description Set Hidden to tsMustBeSet to only include files or directories that are not included in an ordinary directory listing, in the search result. Set Hidden to tsMustBeUnSet to exclude these files or directories. If Hidden is set to tsDontCare then hidden files or directories aren't excluded in the search result. Include stAttribute in <LINK TJvSeachParams.SeachType,SearchType> to actually limit the search result. See Also Archive, Compressed, Encrypted, Normal, NotContentIndexed, OffLine, ReadOnly, ReparsePoint, SparseFile, System, Temporary ---------------------------------------------------------------------------------------------------- @@TJvSearchAttributes.IncludeAttr Summary Specifies the attributes that must be set for files and directories to be included in the search result. Description Read IncludeAttr to determine the attributes of a file or directory that must be set, for it to be included in the search result. Set IncludeAttr to specify the include attributes at once. Use the other properties of TJvSearchAttributes to specify the include attributes per attribute. Include stAttribute in <LINK TJvSeachParams.SeachType,SearchType> to actually limit the search result. See Also ExcludeAttr ---------------------------------------------------------------------------------------------------- @@TJvSearchAttributes.Normal Summary Specifies whether normal files must be included in the search result. Description Normal files are files that have no other attributes set. Directories do not have this attribute set. Set Normal to tsMustBeSet to only include normal files in the search result. If an other attribute is as well set to tsMustBeSet, it will give an empty search result. Set Normal to tsMustBeUnSet to exclude these files. If Normal is set to tsDontCare then normal files aren't excluded in the search result. Include stAttribute in <LINK TJvSeachParams.SeachType,SearchType> to actually limit the search result. See Also Archive, Compressed, Encrypted, Hidden, NotContentIndexed, OffLine, ReadOnly, ReparsePoint, SparseFile, System, Temporary ---------------------------------------------------------------------------------------------------- @@TJvSearchAttributes.NotContentIndexed Summary Specifies whether non-indexed files or directories must be included in the search result. Description Set NotContentIndexed to tsMustBeSet to only include files or directories that will not be indexed by the content indexing service, in the search result. Set NotContentIndexed to tsMustBeUnSet to exclude these files or directories. If NotContentIndexed is set to tsDontCare then non-indexed files or directories aren't excluded in the search result. Include stAttribute in <LINK TJvSeachParams.SeachType,SearchType> to actually limit the search result. See Also Archive, Compressed, Encrypted, Hidden, Normal, OffLine, ReadOnly, ReparsePoint, SparseFile, System, Temporary ---------------------------------------------------------------------------------------------------- @@TJvSearchAttributes.OffLine Summary Specifies whether files or directories marked as off-line must be included in the search result. Description Set OffLine to tsMustBeSet to only include files or directories marked as off-line in the search result. Set OffLine to tsMustBeUnSet to exclude these files or directories. If OffLine is set to tsDontCare then off-line files or directories aren't excluded in the search result. Include stAttribute in <LINK TJvSeachParams.SeachType,SearchType> to actually limit the search result. See Also Archive, Compressed, Encrypted, Hidden, Normal, NotContentIndexed, ReadOnly, ReparsePoint, SparseFile, System, Temporary ---------------------------------------------------------------------------------------------------- @@TJvSearchAttributes.ReadOnly Summary Specifies whether read-only files or directories must be included in the search result. Description Set ReadOnly to tsMustBeSet to only include read-only files or directories in the search result. Set ReadOnly to tsMustBeUnSet to exclude these files or directories. If ReadOnly is set to tsDontCare then read-only files or directories aren't excluded in the search result. Include stAttribute in <LINK TJvSeachParams.SeachType,SearchType> to actually limit the search result. See Also Archive, Compressed, Encrypted, Hidden, Normal, NotContentIndexed, OffLine, ReparsePoint, SparseFile, System, Temporary ---------------------------------------------------------------------------------------------------- @@TJvSearchAttributes.ReparsePoint Summary Specifies whether files or directories with an associated reparse point must be included in the search result. Description Set ReparsePoint to tsMustBeSet to only include files or directories with an associated reparse point, in the search result. Set ReparsePoint to tsMustBeUnSet to exclude these files or directories. If ReparsePoint is set to tsDontCare then files or directories with an reparse point aren't excluded in the search result. Include stAttribute in <LINK TJvSeachParams.SeachType,SearchType> to actually limit the search result. See Also Archive, Compressed, Encrypted, Hidden, Normal, NotContentIndexed, OffLine, ReadOnly, SparseFile, System, Temporary ---------------------------------------------------------------------------------------------------- @@TJvSearchAttributes.SparseFile Summary Specifies whether sparse files must be included in the search result. Description Set SparseFile to tsMustBeSet to only include sparse files in the search result. Set SparseFile to tsMustBeUnSet to exclude these files. If SparseFile is set to tsDontCare then sparse files aren't excluded in the search result. Include stAttribute in <LINK TJvSeachParams.SeachType,SearchType> to actually limit the search result. Note Directories can't have this attribute set. See Also Archive, Compressed, Encrypted, Hidden, Normal, NotContentIndexed, OffLine, ReadOnly, ReparsePoint, System, Temporary ---------------------------------------------------------------------------------------------------- @@TJvSearchAttributes.System Summary Specifies whether system files or directories must be included in the search result. Description Set System to tsMustBeSet to only include files or directories that are part of the operating system or that are used exclusively by the operating system, in the search result. Set System to tsMustBeUnSet to exclude these files or directories. If System is set to tsDontCare then system files or directories aren't excluded in the search result. Include stAttribute in <LINK TJvSeachParams.SeachType,SearchType> to actually limit the search result. See Also Archive, Compressed, Encrypted, Hidden, Normal, NotContentIndexed, OffLine, ReadOnly, ReparsePoint, SparseFile, Temporary ---------------------------------------------------------------------------------------------------- @@TJvSearchAttributes.Temporary Summary Specifies whether temporary files must be included in the search result. Description Set Temporary to tsMustBeSet to only include files that are being used for temporary storage, in the search result. Set Temporary to tsMustBeUnSet to exclude these files. If Temporary is set to tsDontCare then temporary files aren't excluded in the search result. Directories can't have this attribute set. See Also Archive, Compressed, Encrypted, Hidden, Normal, NotContentIndexed, OffLine, ReadOnly, ReparsePoint, SparseFile, System ---------------------------------------------------------------------------------------------------- @@TJvSearchFiles <TITLEIMG TJvSearchFiles> <GROUP TJvSearchFiles> Summary Enables you to search for files and directories. Description Use TJvSearchFiles to perform a search operation for files and directories. First use the properties of TJvSearchFiles to specify how and what to search for: * Use RootDirectory to specify the start directory for the search. * Use DirOption to specify whether the component must only scan the start directory, must also scan in valid - as specified by DirParams - sub-directories or must scan in all sub-directories. * Use ErrorResponse to specify how a TJvSearchFiles component should react on errors. * Use FileParams to specify which files are included in the search result. Include soSearchFiles in Options to actually search for files. * Use DirParams to specify which directories are included in the search result. If DirOption is set to doExcludeInvalidDirs or doExcludeCompleteInvalidDirs then DirParams also limits the search to sub-directories that match to the parameters specified by DirParams. Include soSearchDirs in Options to actually search for directories. * Use Options to specify various behavioral properties of the search component. Some work can be done by the component or by the user: * TJvSearchFiles can store all found files and directories in Files and Dirs resp., or this can be done by the user in response of OnFindFile and OnFindDirectory events. Include soOwnerData in Options to let the component <i>not</i> store found files and directories. * FileParams and DirParams can be used to limit the search result to files and directories that match the parameters described by these objects; or this can be done by the user in reponse of the OnCheck event. After setting these properties you can call Search to start the search operation. Now the following events will be triggered during the search operation: * OnBeginScanDir: when the component starts scanning a directory. * OnCheck: when the component needs to check if a file or directory is valid. If you don't write an OnCheck event handler, then the component uses the DirParams and FileParams object to determine if a file or directory is valid. * OnFindFile: when the component finds a valid file. * OnFindDirectory: when the component finds a valid directory. * OnAbort: when the user aborts the search operation by calling Abort. While searching the component updates the TotalDirectories, TotalFiles, and TotalFileSize properties, if a file or directory is found. Eventually the search operation will end with result False, if an error occurred or the user did abort the operation; or otherwise with result True. ---------------------------------------------------------------------------------------------------- @@TJvSearchFiles.Abort Summary Stops an search operation. Description Call Abort to terminate a search operation started by calling Search. Search will return with result False. See Also Search ---------------------------------------------------------------------------------------------------- @@TJvSearchFiles.Directories Summary Returns a list of the found directory names. Description Directories is a string list that contains each found directory name. If soStripDirs is included in Options, only the directory name is stored. Otherwise the directory name is stored with its full directory path. soOwnerData must <i>not</i> be included in Options but soSearchDirs must be included, otherwise Directories stays empty. Use properties and methods for string lists to traverse this list of directories and read individual items. See Also Files, Options ---------------------------------------------------------------------------------------------------- @@TJvSearchFiles.DirOption <COMBINEWITH TJvDirOption> ---------------------------------------------------------------------------------------------------- @@TJvSearchFiles.DirParams Summary Specifies which directories are included in the search result or in which directories must be searched for files or directories Description If DirOption is set to doExcludeSubDirs, doIncludeSubDirs, then DirParams specifies which directories are included in the search result. If DirOption is set to doExcludeInvalidDirs, doExcludeCompleteInvalidDirs then it also specifies in which directories must be searched for files or directories. Include soSearchDirs in Options to actually search for directories. See Also FileParams, Options ---------------------------------------------------------------------------------------------------- @@TJvSearchFiles.ErrorResponse <COMBINEWITH TJvErrorResponse> ---------------------------------------------------------------------------------------------------- @@TJvSearchFiles.FileParams Summary Specifies which files are included in the search result. Description Use FileParams to specify which files are included in the search result. Use property SearchTypes to specify Include soSearchFiles in Options to actually search for files. See Also DirParams, Options ---------------------------------------------------------------------------------------------------- @@TJvSearchFiles.Files Summary Returns a list of the found file names. Description Files is a string list that contains each found file name. If soStripDirs is included in Options, only the file name is stored. Otherwise the file name is stored with its full directory path. soOwnerData must <i>not</i> be included in Options but soSearchFiles must be included, otherwise Files stays empty. Use properties and methods for string lists to traverse this list of files and read individual items. See Also Directories, Options ---------------------------------------------------------------------------------------------------- @@TJvSearchFiles.FindData Summary Describes a file or directory. Description Use FindData in an OnCheck, OnFindDirectory or OnFindFile event handler to determine the characteristics of the file or directory that has been found by the search component. ---------------------------------------------------------------------------------------------------- @@TJvSearchFiles.IsRootDirValid Summary Indicates if the root directory is valid. Description Read IsRootDirValid to determine if the directory specified by RootDirectory is valid as specified by DirParams. If IsRootDirValid is False and soCheckRootDirValid is included in Options then no search for files or directories is performed in that directory; if also DirOption equals doExcludeSubDirs or doExcludeInvalidSubDirs then no search at all is performed. Otherwise the component only searches for files or directories in the sub-directories of the root directory and not in the root directory self. See Also DirParams, Options, RootDirectory ---------------------------------------------------------------------------------------------------- @@TJvSearchFiles.OnAbort Summary Occurs when the user calls Abort while the component is searching for files. Description Use the OnAbort event handler to respond when the user aborts the search operation. See Also Abort ---------------------------------------------------------------------------------------------------- @@TJvSearchFiles.OnBeginScanDir Summary Occurs when the component starts searching for files and directories in a directory. Description Use the OnBeginScanDir event handler to respond when the component starts searching for files and directories in a directory. Parameters Sender - The TJvSearchFiles component that has sent this event. AName - The name and full directory path of the directory. See Also OnFindDirectory, OnFindFile ---------------------------------------------------------------------------------------------------- @@TJvSearchFiles.OnCheck Summary Occurs if a file or directory needs to be checked whether it's valid. Description Write an OnCheck event handler to programmatically filter the files and directories that are valid. Use FindData to determine the type of directory or file currently being checked. Parameters Sender - The TJvSearchFiles component that has sent this event. Result - Set Result to False to indicate that the current file or directory - as specified by FindData - is invalid. Set Result to True to indicate that it is a valid file or directory. See Also FindData ---------------------------------------------------------------------------------------------------- @@TJvSearchFiles.OnError Summary Occurs if an error occurred while scanning for files or directories. Description Use the OnError event handler to respond to errors that occured while scanning for files or directories. Parameters Sender - The TJvSearchFiles component that has sent this event. Handled - Set Handled to True if the OnError event handler successfully deals with the error condition, to prevent an error from being raised, or to prevent an abort of the search operation. If Handled is set to False, the component will handle the error as specified by the ErrorResponse property. See Also ErrorResponse ---------------------------------------------------------------------------------------------------- @@TJvSearchFiles.OnFindDirectory Summary Occurs when a valid directory is found. Description Write an OnFindDirectory event handler to respond when the search component finds a valid directory. Use FindData to determine the characteristics of the directory that has been found. Parameters Sender - The TJvSearchFiles component that has sent this event. AName - The name of the directory. If soStripDirs is excluded from Options, AName includes the full directory path of the directory. See Also OnBeginScanDir, OnFindFile, Options ---------------------------------------------------------------------------------------------------- @@TJvSearchFiles.OnFindFile Summary Occurs when a valid file is found. Description Write an OnFindFile event handler to respond when the search component finds a valid file. Use FindData to determine the characteristics of the file that has been found. Parameters Sender - The TJvSearchFiles component that has sent this event. AName - The name of the file. If soStripDirs is excluded from Options, AName includes the full directory path of the file. See Also OnBeginScanDir, OnFindDirectory, Options ---------------------------------------------------------------------------------------------------- @@TJvSearchFiles.Options <COMBINEWITH TJvSearchOption> ---------------------------------------------------------------------------------------------------- @@TJvSearchFiles.RootDirectory Summary Specifies the directory in which the component starts searching for files and directories. Description Use RootDirectory to specify the directory in which the component must start searching for files and directories. Use DirOption to specify if it also must search in the sub-directories of RootDirectory. Include soExcludeFilesInRootDir in Options to disable searching for files or directories in RootDirectory, and only search in it's sub-directories. (If DirOption equals doExcludeSubDirs then no search at all is performed.) Include soCheckRootDirValid in Options to disable searching for files or directories in RootDirectory, if it isn't a valid directory as specified by DirParams. If so, the component only searches in the sub-directories of RootDirectory. (If DirOption equals doExcludeSubDirs or doExcludeInvalidSubDirs then no search at all is performed.) See Also Options ---------------------------------------------------------------------------------------------------- @@TJvSearchFiles.Search Summary Searches for files or directories. Description Call Search to start a search operation. If soSearchFiles is included in Options, then Search will search for files. If soSearchDirs is included in Options, then Search will search for directories. Use RootDirectory to specify the start directory for the search. Use DirOption to specify whether Search must only scan the start directory or must also include it's sub-directories. Each time a valid directory - as specified by DirParams - is found, the component updates TotalDirectories and TotalFileSize, triggers the OnFindDirectory event and adds the directory name to Dirs (if soOwnerData isn't included in Options). Each time a valid file - as specified by FileParams - is found, the component updates TotalFiles and TotalFileSize, triggers the OnFindFile event and adds the file name to Files (if soOwnerData isn't included in Options). Eventually Search will end with result False, if an error occurred or the user did abort the operation; or otherwise with result True. See Also Abort, Searching ---------------------------------------------------------------------------------------------------- @@TJvSearchFiles.Searching Summary Indicates whether the component is searching. Description Read Searching to determine if the component is searching. If Searching is True, the component is searching for files and directories. Call Abort to stop the search. If Searching is False, the component isn't searching for files and directories. Call Search to start a search. See Also Abort, Search ---------------------------------------------------------------------------------------------------- @@TJvSearchFiles.TotalDirectories Summary Indicates the total number of directories found. Description If Searching equals False then the component has finished searching and TotalDirectories indicates the total number of directories found. If Searching equals True, the component is still searching and TotalDirectories indicates the total number of directories found so far. See Also Searching, TotalFiles, TotalFileSize ---------------------------------------------------------------------------------------------------- @@TJvSearchFiles.TotalFiles Summary Indicates the total number of files found. Description If Searching equals False then the component has finished searching and TotalFiles indicates the total number of files found. If Searching equals True, the component is still searching and TotalFiles indicates the total number of files found so far. See Also Searching, TotalDirectories, TotalFileSize ---------------------------------------------------------------------------------------------------- @@TJvSearchFiles.TotalFileSize Summary Indicates the total size of the files and directories found in bytes. Description If Searching equals False then the component has finished searching and TotalFileSize indicates the total size of the files and directories found in bytes. If Searching equals True, the component is still searching and TotalFileSize indicates the total size of the files and directories found so far, in bytes. See Also Searching, TotalDirectories, TotalFiles ---------------------------------------------------------------------------------------------------- @@TJvSearchOption Summary Specifies various behavioral properties of the search component. Description @@TJvSearchOption.soAllowDuplicates Allow duplicate file or directory names be stored in the Files and Directories lists. If soOwnerData is included in Options then this flag is ignored. @@TJvSearchOption.soCheckRootDirValid Checks whether the root directory is valid as specified by DirParams. If the root directory isn't valid then no search for files or directories is performed in that directory; if also DirOption equals doExcludeSubDirs or doExcludeInvalidSubDirs then no search at all is performed. Otherwise the component only searches for files or directories in the sub-directories of the root directory. @@TJvSearchOption.soExcludeFilesInRootDir Disables searching for files or directories in the root directory as specified by RootDirectory. If DirOption equals doExcludeSubDirs then no search at all is performed. @@TJvSearchOption.soOwnerData Doesn't fill the Files and Directories lists with found file or directory names while searching. @@TJvSearchOption.soSearchDirs Searches for directories; ie if a valid - as specified by DirParams - directory is found, the component will trigger an OnFindDirectory event, add the directory name to the Directories list - if soOwnerData isn't included in Options - and update TotalDirectories and TotalFileSize. @@TJvSearchOption.soSearchFiles Searches for files; ie if a valid - as specified by FileParams - file is found, the component will trigger an OnFindFile event, add the file name to the Files list - if soOwnerData isn't included in Options - and update TotalFileSize and TotalFiles. @@TJvSearchOption.soSorted Automatically sorts the strings in the Files and Directories lists. If soOwnerData is included in Options then this flag is ignored. @@TJvSearchOption.soStripDirs Strips the path of a directory or file name before inserting it in the Files and Directories lists. ---------------------------------------------------------------------------------------------------- @@TJvSearchOptions <COMBINEWITH TJvSearchOption> ---------------------------------------------------------------------------------------------------- @@TJvSearchParams <GROUP TJvSearchFiles> Summary Represents a filter for files and directories. Description TJvSearchFiles uses the TJvSearchParams object to limit the search result to files and directories whose parameters match with the parameters described by TJvSearchAttributes. Use SearchTypes to specify the parameters that a file or directory must be matched to, to decide whether it can be added to the search results. You can filter out files and directories by the following parameters: * Use Attributes to limit the search results to files and directories that have specific attributes. * Use FileMasks to limit the search results to files and directories whose name match a certain mask. * Use MinSize and MaxSize to limit the search results to files and directories with an specific file size. * Use LastChangeAfter and LastChangeBefore to limit the search results to files and directores that are last changed or created in an specific time period. Alternatively, you can write an OnCheck event handler to filter out files and diretories by yourself. ---------------------------------------------------------------------------------------------------- @@TJvSearchParams.Attributes Summary Points to a attribute filter for files and directories. Description Use Attributes to limit the search results to files and directories whose file attributes match to values represented by Attributes. ---------------------------------------------------------------------------------------------------- @@TJvSearchParams.Check Summary Checks whether a file or directory is valid. Description A TJvSearchFiles component calls Check to determine if a file or directory is valid. Check will match the parameters of a file or directory to the values specified by SearchTypes. Parameters AFindData - Describes the file or directory that must be checked. See Also SearchTypes ---------------------------------------------------------------------------------------------------- @@TJvSearchParams.FileMask Summary Lists the masks in the FileMasks as a single string with the individual strings delimited by the character specified by FileMaskSeperator. Description Use FileMask to get or set all the masks in FileMasks in a single string delimited by the character specified by FileMaskSeperator. See Also FileMasks, FileMaskSeperator, SearchTypes ---------------------------------------------------------------------------------------------------- @@TJvSearchParams.FileMasks Summary Contains file masks used to limit the search results. Description Set each item in FileMasks to a regular expression to limit the search results to files and directories that match at least one of the masks in FileMasks. The value of a mask is a filename which can contain wildcard characters (* and ?). The asterisk (*) is a wildcard which matches any number of arbitrary characters. The question mark (?) is a wildcard which matches a single arbitrary character. Use FileMasks to add, insert, delete and move file masks. Use properties and methods for string lists to manipulate the items in the list. stFileMask must be included in SearchTypes, otherwise the name of a file or directory will not be matched with the masks in FileMasks to determine if a file or directory is valid. If stFileMask is included in SearchTypes but FileMasks contains no masks, then all files and directories are valid for this match. Include stFileMaskCaseSensitive in SearchTypes to compare the name of a file or directory case-sensitive with the masks in FileMasks. See Also FileMask, FileMaskSeperator, SearchTypes ---------------------------------------------------------------------------------------------------- @@TJvSearchParams.FileMaskSeperator Summary Specifies the seperator character used to seperate masks when reading or setting FileMask. Description Use FileMaskSeperator to specify a seperator character used to seperate masks when reading or setting FileMask. See Also FileMask, FileMasks, SearchTypes ---------------------------------------------------------------------------------------------------- @@TJvSearchParams.LastChangeAfter Summary Specifies a date and time after which a file must be last written to or a directory must be created. Description Use LastChangeAfter in FileParams to specify a date and time after which a file must be last written to, for it to be included in the search result. Use LastChangeAfter in DirParams to specify a date and time after which a directory must be created, for it to be included in the search result. stLastChangeAfter must be included in SearchTypes, otherwise the last write time of a file or directory will not be matched with LastChangeAfter to determine if a file or directory is valid. Note Not all file systems dot support last write time. See Also LastChangeBefore, SearchTypes ---------------------------------------------------------------------------------------------------- @@TJvSearchParams.LastChangeBefore Summary Specifies a date and time before which a file must be last written to or a directory must be created. Description Use LastChangeBefore in FileParams to specify a date and time before which a file must be last written to, for it to be included in the search result. Use LastChangeBefore in DirParams to specify a date and time before which a directory must be created, for it to be included in the search result. stLastChangeBefore must be included in SearchTypes, otherwise the last write time of a file or directory will not be matched with LastChangeBefore to determine if a file or directory is valid. Note Not all file systems do support last write time. See Also LastChangeAfter, SearchTypes ---------------------------------------------------------------------------------------------------- @@TJvSearchParams.MaxSize Summary Specifies the maximum size of a file or directory in bytes. Description Use MaxSize to specify the maximum size in bytes of a file or directory, for it to be included in the search result. stMaxSize must be included in SearchTypes, otherwise the size of a file or directory will not be matched with MaxSize to determine if a file or directory is valid. See Also MinSize, SearchTypes ---------------------------------------------------------------------------------------------------- @@TJvSearchParams.MinSize Summary Specifies the minimum size of a file or directory in bytes. Description Use MinSize to specify the minimum size in bytes of a file or directory, for it to be included in the search result. stMinSize must be included in SearchTypes, otherwise the size of a file or directory will not be matched with MinSize to determine if a file or directory is valid. See Also MaxSize, SearchTypes ---------------------------------------------------------------------------------------------------- @@TJvSearchParams.SearchTypes <COMBINEWITH TJvSearchType> ---------------------------------------------------------------------------------------------------- @@TJvSearchType Summary Specifies the parameters that a file or directory must be matched to, to decide whether it can be added to the search results. Description Use SearchTypes to specify the parameters that a file or directory must be matched to, to decide whether it can be added to the search results. If DirOption equals doExcludeInvalidDirs or doExcludeCompleteInvalidDirs then property SearchTypes of DirParams also indicates the parameters that a directory must be matched to, to decide whether the component must search in that directory for other files or directories. @@TJvSearchType.stAttribute Match the file or directories attributes to the attributes specified by Attributes. @@TJvSearchType.stFileMask Match the name of the file or directory to the file masks specified by FileMasks. The name must match any of the masks, for the file or directory to be included in the search results. @@TJvSearchType.stFileMaskCaseSensitive Match the name of the file or directory case-sensitive to the file masks specified by FileMasks. stFileMask must be included in SearchTypes, otherwise this flag is ignored. @@TJvSearchType.stLastChangeAfter For a file, match the date and time when the file was last written to, with the date and time specified by LastChangeAfter. For a directory, match the date and time when the directory was created, with LastChangeAfter. Only include files or directories in the search result, that are last written to, or created after the date and time specified by LastChangeAfter. @@TJvSearchType.stLastChangeBefore For a file, match the date and time when the file was last written to, with the date and time specified by LastChangeBefore. For a directory, match the date and time when the directory was created, with LastChangeBefore. Only include files or directories in the search result, that are last written to, or created before the date and time specified by LastChangeBefore. @@TJvSearchType.stMaxSize Match the file or directories size with the value specified by MaxSize. Only include files or directories in the search result, that have a smaller size than MaxSize. @@TJvSearchType.stMinSize Match the file or directories size with the value specified by MinSize. Only include files or directories in the search result, that have a smaller size than MinSize. ---------------------------------------------------------------------------------------------------- @@TJvSearchTypes <COMBINEWITH TJvSearchType> |