XgPhatUtil


Functions

void GetDosTimeStamp (u_short *dostim, u_short *dosdat)
 Create a DOS timestamp of the current time and date.
char * GetParentPath (CONST char *path, CONST char **comp)
 Chop off the last component of a path.
int IsFixedRootDir (NUTFILE *ndp)
 Test for PHAT12/PHAT16 root directory.
int MakePhatName (CONST char *src, u_char *dst)
 Convert filename to a directory entry name.
void MakeVisibleName (CONST u_char *src, char *dst)
 Convert a directory entry name to a visible file name.
void PhatFilePosRewind (PHATFILE *fcb)
 Set file pointer back to zero.
int PhatFilePosSet (NUTFILE *nfp, u_long pos)
 Move file pointer to a specified position.


Function Documentation

void GetDosTimeStamp ( u_short dostim,
u_short dosdat 
)

Create a DOS timestamp of the current time and date.

Parameters:
dostim Receives the time of day part.
dosdat Receives the calendar date part.

char* GetParentPath ( CONST char *  path,
CONST char **  comp 
)

Chop off the last component of a path.

Parameters:
path Full path.
comp Points to a pointer which will be set to the last component within the full path.
Returns:
Pointer to a newly allocated string containing the parent path, or NULL in case of an error. The allocated buffer must be released by the caller.

int IsFixedRootDir ( NUTFILE ndp  ) 

Test for PHAT12/PHAT16 root directory.

Parameters:
ndp Handle of an opened file to check.
Returns:
0 if the file is not a fixed root directory.

int MakePhatName ( CONST char *  src,
u_char dst 
)

Convert filename to a directory entry name.

Parameters:
src Original name in the format 'name.ext'.
dst Converted name in the format 'name ext'.
Returns:
0 on success, 1 if the name contains wildcards or -1 if the name is malformed.

void MakeVisibleName ( CONST u_char src,
char *  dst 
)

Convert a directory entry name to a visible file name.

Parameters:
src Original name in the format 'name ext'.
dst Converted name in the format 'name.ext'.
Returns:
0 on success, 1 if the name contains wildcards or -1 if the name is malformed.

void PhatFilePosRewind ( PHATFILE fcb  ) 

Set file pointer back to zero.

Parameters:
fcb Specifies the file control block.

int PhatFilePosSet ( NUTFILE nfp,
u_long  pos 
)

Move file pointer to a specified position.

Moving beyond the current file size is not supported.

Parameters:
nfp File descriptor.
pos Requested file position.
Returns:
0 on success, -1 otherwise. In the latter case the position is unspecified.


Generated on Tue Jan 23 21:12:31 2007 for BTnut System Software by doxygen 1.4.7