-pascal OSErr NameFileSearch(ConstStr255Param volName,
- short vRefNum,
- ConstStr255Param fileName,
- FSSpecPtr matches,
- long reqMatchCount,
- long *actMatchCount,
- Boolean newSearch,
- Boolean partial);
-/* ¦ Search for files by file name with PBCatSearch.
- The NameFileSearch function searches for files with a specific file
- name on a volume that supports PBCatSearch.
- Note: A result of catChangedErr means the catalog has changed between
- searches, but the search can be continued with the possiblity that you
- may miss some matches or get duplicate matches. For all other results
- (except for noErr), the search cannot be continued.
-
- volName input: A pointer to the name of a mounted volume
- or nil.
- vRefNum input: Volume specification.
- fileName input: The name of the file to search for.
- matches input: Pointer to array of FSSpec where the match list is
- returned.
- reqMatchCount input: Maximum number of matches to return (the number of
- elements in the matches array).
- actMatchCount output: The number of matches actually returned.
- newSearch input: If true, start a new search. If false and if
- vRefNum is the same as the last call to
- NameFileSearch, then start searching at the
- position where the last search left off.
- partial input: If the partial parameter is false, then only files
- that exactly match fileName will be found. If the
- partial parameter is true, then all file names that
- contain fileName will be found.
-
- Result Codes
- noErr 0 No error
- nsvErr -35 Volume not found
- ioErr -36 I/O error
- eofErr -39 End of catalog found (this is normal!)
- paramErr -50 Parameter block has invalid parameters
- (see source for VerifyUserPB) or
- invalid catPosition record was passed
- extFSErr -58 External file system error - no file
- system claimed this call.
- memFullErr -108 Memory could not be allocated in heap
- catChangedErr -1304 Catalog has changed and catalog position
- record may be invalid
- afpCatalogChanged -5037 Catalog has changed and search cannot
- be resumed
-
- __________
-
- Also see: CreatorTypeFileSearch
+EXTERN_API( OSErr )
+NameFileSearch(
+ ConstStr255Param volName,
+ short vRefNum,
+ ConstStr255Param fileName,
+ FSSpecPtr matches,
+ long reqMatchCount,
+ long * actMatchCount,
+ Boolean newSearch,
+ Boolean partial);
+
+
+/*
+ The NameFileSearch function searches for files with a specific file
+ name on a volume that supports PBCatSearch.
+ Note: A result of catChangedErr means the catalog has changed between
+ searches, but the search can be continued with the possiblity that you
+ may miss some matches or get duplicate matches. For all other results
+ (except for noErr), the search cannot be continued.
+
+ volName input: A pointer to the name of a mounted volume
+ or nil.
+ vRefNum input: Volume specification.
+ fileName input: The name of the file to search for.
+ matches input: Pointer to array of FSSpec where the match list is
+ returned.
+ reqMatchCount input: Maximum number of matches to return (the number of
+ elements in the matches array).
+ actMatchCount output: The number of matches actually returned.
+ newSearch input: If true, start a new search. If false and if
+ vRefNum is the same as the last call to
+ NameFileSearch, then start searching at the
+ position where the last search left off.
+ partial input: If the partial parameter is false, then only files
+ that exactly match fileName will be found. If the
+ partial parameter is true, then all file names that
+ contain fileName will be found.
+
+ Result Codes
+ noErr 0 No error
+ nsvErr -35 Volume not found
+ ioErr -36 I/O error
+ eofErr -39 End of catalog found (this is normal!)
+ paramErr -50 Parameter block has invalid parameters
+ (see source for VerifyUserPB) or
+ invalid catPosition record was passed
+ extFSErr -58 External file system error - no file
+ system claimed this call.
+ memFullErr -108 Memory could not be allocated in heap
+ catChangedErr -1304 Catalog has changed and catalog position
+ record may be invalid
+ afpCatalogChanged -5037 Catalog has changed and search cannot
+ be resumed
+
+ __________
+
+ Also see: CreatorTypeFileSearch