fs::sys::fdr Namespace Reference


Detailed Description

File & directory utilities.


Classes

class  DirLst_t
 Directory list. More...

Functions

const char * GetPathSpr ()
 Returns a platform dependent path separator (as a string).
const char * GetNewLn ()
 Returns a system dependent new-line code (as a string).
const char * GetAppDir ()
 Returns the app startup full directory path (with the separ. at the end).
bool IsDirExist (const char *pszFullDir)
 Checks if the given full directory path exists.
bool MakeDir (const char *pszFullDir)
 Creates a directory structure according to the given full dir. path.
void NicePath (char *pszOut, const char *pszDir, const char *pszFile=0)
 Merges and decorates two given parts of a path.


Function Documentation

const char * fs::sys::fdr::GetPathSpr (  ) 

Returns a platform dependent path separator (as a string).

Examples:
_tests/fsFileDir/main.cpp.

Definition at line 73 of file fsFileDir.cpp.

const char * fs::sys::fdr::GetNewLn (  ) 

Returns a system dependent new-line code (as a string).

Definition at line 85 of file fsFileDir.cpp.

const char * fs::sys::fdr::GetAppDir (  ) 

Returns the app startup full directory path (with the separ. at the end).

Todo:
Make the whole body static.
Examples:
_tests/fsFileDir/main.cpp.

Definition at line 92 of file fsFileDir.cpp.

References FS_ASSERT, GetPathSpr(), and fs::ut::str::WStr2Str().

Here is the call graph for this function:

bool fs::sys::fdr::IsDirExist ( const char *  pszFullDir  ) 

Checks if the given full directory path exists.

Examples:
_tests/fsFileDir/main.cpp.

Definition at line 122 of file fsFileDir.cpp.

References FS_VERIFY_RETURN_VAL.

bool fs::sys::fdr::MakeDir ( const char *  pszFullDir  ) 

Creates a directory structure according to the given full dir. path.

Parameters:
pszFullDir A valid system dependent full directory path is expected, no internal checking is performed.
Returns:
true indicates success. Returns false if it was not possible to create the requested directory structure completely.
Examples:
_tests/fsFileDir/main.cpp.

Definition at line 150 of file fsFileDir.cpp.

References FS_ASSERT, FS_ASSERT_MSG, FS_VERIFY_RETURN_VAL, GetPathSpr(), and IsDirExist().

Here is the call graph for this function:

void fs::sys::fdr::NicePath ( char *  pszOut,
const char *  pszDir,
const char *  pszFile = 0 
)

Merges and decorates two given parts of a path.

If there is no path separator at the end of the first part, it is added, then the second part (which is optional) is appended. Path separators are replaced according to current environment configuration and multiple separators are removed.

Note:
Be sure the size of pszOut is big enough for holding the resulting string, which is always shorter then combined original parts.
Examples:
_tests/fsFileDir/main.cpp.

Definition at line 192 of file fsFileDir.cpp.

References FS_VERIFY_RETURN, and GetPathSpr().

Here is the call graph for this function:


FipS' Code (Thu Feb 15 22:43:55 2007) - (c) Filip STOKLAS (FipS) - [ www ] [ Guest Book ]