CF2 API Reference (PDF) - Persistor Instruments Inc

CF2 API Reference (PDF) - Persistor Instruments Inc CF2 API Reference (PDF) - Persistor Instruments Inc

persistor.com
from persistor.com More from this publisher
10.07.2015 Views

CF2 API ReferenceDOS Directory FunctionsDIRFindFirst -- Find first directory entry starting at pathDescription:Prototype:Inputs:Returns:This is called first when trying to get directory information.short DIRFindFirst(char *path, struct dirent *dp);path is a pointer to the path from which to start the searchdp is a pointer to a directory entry structureAn error code which could be dirErrorStart = DIR_ERRORS or dsdEndOfDir (end of directoryreached)DIRFreeSpace -- Return free space on specified driveDescription:Prototype:Inputs:Returns:Return free space on specified drivelong DIRFreeSpace(char *drive);drive is, for example, “c:\\”The number of free bytes as a longDIRFindEnd -- Conclude directory searchDescription:Prototype:Inputs:Returns:Conclude directory searchshort DIRFindEnd(struct dirent *dp);dp is a pointer to a directory entry structureAn error code which could be dirErrorStart = DIR_ERRORS or dsdEndOfDir (end of directoryreached)DIRFindNext -- Find next directory entryDescription:Prototype:Inputs:Returns:Notes:Called after an initial call to DIRFindFirst using the same pointer to directory entry. dp is filledwith the information from the next directory entry.short DIRFindNext(struct dirent *dp);dp is a pointer to a directory entry structureAn error code which could be dirErrorStart = DIR_ERRORS or dsdEndOfDir (end of directoryreached)Called after an initial call to DIRFindFirst using the same pointer to directory entry. dp is filledwith the information from the next directory entry.PERSISTORInstruments Inc.20 of 84CF2 API Reference7/19/2005

CF2 API ReferenceDIRMatchName -- Return true if filename matches ambiguous patternDescription:Prototype:Inputs:Returns:Return TRUE if filename matches ambiguous patternbool DIRMatchName(char *filename, char *pattern);filename the filename to comparepattern is a pattern like “*.txt” or “*.*” or an exact filename match. This is usually used inconjunction with DIRFindFirst and DIRFindNext comparing a pattern against the returned namefrom the DIRENT structure (d_name).TRUE is the pattern matches the filename and FALSE otherwiseDIRTotalSpace -- Return total space on specified driveDescription:Prototype:Inputs:Returns:Return total space on specified drivelong DIRTotalSpace(char *drive);drive is, for example, “c:\\”The total number of bytes as a longPERSISTORInstruments Inc.21 of 84CF2 API Reference7/19/2005

<strong>CF2</strong> <strong>API</strong> <strong>Reference</strong>DIRMatchName -- Return true if filename matches ambiguous patternDescription:Prototype:Inputs:Returns:Return TRUE if filename matches ambiguous patternbool DIRMatchName(char *filename, char *pattern);filename the filename to comparepattern is a pattern like “*.txt” or “*.*” or an exact filename match. This is usually used inconjunction with DIRFindFirst and DIRFindNext comparing a pattern against the returned namefrom the DIRENT structure (d_name).TRUE is the pattern matches the filename and FALSE otherwiseDIRTotalSpace -- Return total space on specified driveDescription:Prototype:Inputs:Returns:Return total space on specified drivelong DIRTotalSpace(char *drive);drive is, for example, “c:\\”The total number of bytes as a longPERSISTOR<strong>Instruments</strong> <strong>Inc</strong>.21 of 84<strong>CF2</strong> <strong>API</strong> <strong>Reference</strong>7/19/2005

Hooray! Your file is uploaded and ready to be published.

Saved successfully!

Ooh no, something went wrong!