mkdirhelper Function

Microchip MDD File System Interface

MDDFS Interface Library Help
mkdirhelper Function
C
int mkdirhelper(
    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. This function will first scan through the path to ensure that any DIR names don't exceed 11 characters. It will then backup the current working directory and begin changing directories through the path until it reaches a directory than can't be changed to. It will then create the specified directory and change directories to the new directory. The function will continue creating and changing to directories until the end of the path is reached. The function will then restore the original current working directory.

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 created 
-1 
Directory could not be created 
Side Effects

Will create all non-existant directories in the path. The FSerrno variable will be changed.

Remarks

None

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