FILEfind Function

Microchip MDD File System Interface

MDDFS Interface Library Help
FILEfind Function
C
CETYPE FILEfind(
    FILEOBJ foDest, 
    FILEOBJ foCompareTo, 
    BYTE cmd, 
    BYTE mode
);
Description

The FILEfind function will sequentially cache directory entries within the current working directory into the foDest FSFILE object. If the cmd parameter is specified as LOOK_FOR_EMPTY_ENTRY the search will continue until an empty directory entry is found. If the cmd parameter is specified as LOOK_FOR_MATCHING_ENTRY these entries will be compared to the foCompareTo object until a match is found or there are no more entries in the current working directory. If the mode is specified a '0' the attributes of the FSFILE entries are irrelevant. If the mode is specified as '1' the attributes of the foDest entry must match the attributes specified in the foCompareTo file and partial string search characters may bypass portions of the comparison.

Preconditions

This function should not be called by the user.

Parameters
Parameters 
Description 
foDest 
FSFILE object containing information of the file found 
foCompareTo 
FSFILE object containing the name/attr of the file to be found 
cmd 
  • LOOK_FOR_EMPTY_ENTRY: Search for empty entry.
  • LOOK_FOR_MATCHING_ENTRY: Search for matching entry.

 

mode 
  • 0: Match file exactly with default attributes.
  • 1: Match file to user-specified attributes.

 

Return Values
Return Values 
Description 
CE_GOOD 
File found. 
CE_FILE_NOT_FOUND 
File not found. 
Side Effects

None.

Remarks

None

Microchip MDD File System Interface 1.2.0 - [Aug 18, 2008]
Copyright © 2008 Microchip Technology, Inc.  All rights reserved.