chdirhelper Function

Microchip MDD File System Interface

MDDFS Interface Library Help
chdirhelper Function
C
int chdirhelper(
    BYTE mode, 
    char * ramptr, 
    const rom char * romptr
);
Description

This helper function is used by the FSchdir function. If the path argument is specified in ROM for PIC18 this function will be able to parse it correctly. The function will loop through a switch statement to process the tokens in the path string. Dot or dotdot entries are handled in the first case statement. A backslash character is handled in the second case statement (note that this case statement will only be used if backslash is the first character in the path; backslash token delimiters will automatically be skipped after each token in the path is processed). The third case statement will handle actual directory name strings.

Preconditions

None

Parameters
Parameters 
Description 
mode 
Indicates which path pointer to use 
ramptr 
Pointer to the path specified in RAM 
romptr 
Pointer to the path specified in ROM 
Return Values
Return Values 
Description 
Directory was changed successfully. 
EOF 
Directory could not be changed. 
Side Effects

The current working directory will be changed. The FSerrno variable will be changed. Any unwritten data in the data buffer will be written to the device.

Remarks

None.

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