Main Page | Class Hierarchy | Data Structures | File List | Data Fields | Globals

cbfile.cpp File Reference

#include "cbexttypes.h"
#include <sys/types.h>
#include <sys/stat.h>
#include "cbfile.h"
#include "cbString.h"

Include dependency graph for cbfile.cpp:

Include dependency graph

Defines

#define cbIsFileDeletable(n)   IsFileWritable(n)

Functions

cbString cbGetCurDir ()
 Returns the current working directory.

cbbool cbGetFileData (cbcchr *p_fileName, cb_file_st_data *p_data)
 Returns the administration information of a file.

cbbool cbFileExists (cbcchr *p_fileName)
 Checks if a file exists or not.

cbbool cbIsFileReadOnly (cbcchr *p_fileName)
 Checks if a file is read only or not.

cbsize cbGetFileSize (cbcchr *p_fileName)
 Returns the size of the file.

cbbool cbFindInString (cbcchr *p_str, cbString &result, cbcchr sign, cbuint16 offset)
cbbool cbGetFileName (cbcchr *p_fileName, cbString &result)
 Extracts the file name part of the given file name.

cbString cbGetFileName (cbcchr *p_fileName)
cbbool cbGetFileExt (cbcchr *p_fileName, cbString &result)
cbString cbGetFileExt (cbcchr *p_fileName)
cbbool cbGetFilePath (cbcchr *p_fileName, cbString &result)
cbString cbGetFilePath (cbcchr *p_fileName)
cbbool cbGetFileNameWithoutSuffix (cbcchr *p_fileName, cbString result, cbbool removePath)
cbString cbGetFileNameWithoutSuffix (cbcchr *p_fileName, cbbool removePath)
cbbool cbCheckName (cbcchr *p_name, cbeFileFlags flags)
cbState cbRenameFile (cbcchr *p_newName, cbcchr *p_oldName, cbeFileFlags flags)
cbState cbDeleteFile (cbcchr *p_fileName)
cbState cbCopyFile (cbcchr *p_destName, cbcchr *p_srcName, cbeFileFlags flags)
cbState cbDirExists (cbcchr *p_dirName)
cbState cbRenameDir (cbcchr *p_newName, cbcchr *p_oldName)
cbState cbDeleteDir (cbcchr *p_dirName, cbbool removeContent)
cbbool cbIsRelPath (cbcchr *p_path)
cbbool cbIsAbsPath (cbcchr *p_path)
cbbool cbHasPath (cbcchr *p_path)
cbString cbExpandCwdPath (cbcchr *p_path)
cbString cbMakeAbsPath (cbcchr *p_refPath, cbcchr *p_fileName)
cbString cbMakeRelPath (cbcchr *p_refPath, cbcchr *p_fileName)

Define Documentation

#define cbIsFileDeletable (  n   )     IsFileWritable(n)
 


Function Documentation

cbbool cbCheckName (  cbcchr *  p_name,
cbeFileFlags  flags
) 
 

cbState cbCopyFile (  cbcchr *  p_destName,
cbcchr *  p_srcName,
cbeFileFlags  flags
) 
 

cbState cbDeleteDir (  cbcchr *  p_dirName,
cbbool  removeContent
) 
 

cbState cbDeleteFile (  cbcchr *  p_fileName  ) 
 

cbState cbDirExists (  cbcchr *  p_dirName  ) 
 

cbString cbExpandCwdPath (  cbcchr *  p_path  ) 
 

cbbool cbFileExists (  cbcchr *  p_fileName  ) 
 

Checks if a file exists or not.

Parameters:
p_fileName Pointer to the string with the filename. If this parameter is invalid, we returns also cbFALSE.
Returns:
cbTRUE if the file exists, else cbFALSE.

cbbool cbFindInString (  cbcchr *  p_str,
cbString &  result,
cbcchr  sign,
cbuint16  offset
) 
 

cbString cbGetCurDir (   ) 
 

Returns the current working directory.

Parameters:
- 
Returns:
A string with the current working directory

cbbool cbGetFileData (  cbcchr *  p_fileName,
cb_file_st_data *  p_data
) 
 

Returns the administration information of a file.

Parameters:
p_fileName The file name.
cb_file_st_data A poinbter to the file data that is filled with the information.
Returns:
cbTRUE on success, else cbFALSE.

cbString cbGetFileExt (  cbcchr *  p_fileName  )  [inline]
 

cbbool cbGetFileExt (  cbcchr *  p_fileName,
cbString &  result
)  [inline]
 

cbString cbGetFileName (  cbcchr *  p_fileName  )  [inline]
 

cbbool cbGetFileName (  cbcchr *  p_fileName,
cbString &  result
)  [inline]
 

Extracts the file name part of the given file name.

Parameters:
p_fileName Pointer to the string with the filename.
result Referenz to a result string.
Returns:
if the file namme could get successfully, this function returns cbTRUE, else cbFALSE.

cbString cbGetFileNameWithoutSuffix (  cbcchr *  p_fileName,
cbbool  removePath
)  [inline]
 

cbbool cbGetFileNameWithoutSuffix (  cbcchr *  p_fileName,
cbString  result,
cbbool  removePath
) 
 

cbString cbGetFilePath (  cbcchr *  p_fileName  ) 
 

cbbool cbGetFilePath (  cbcchr *  p_fileName,
cbString &  result
) 
 

cbsize cbGetFileSize (  cbcchr *  p_fileName  ) 
 

Returns the size of the file.

Parameters:
p_fileName Pointer to the string with the filename. If this parameter is invalid, we returns 0.
Returns:
The file size or zero, if the file doesn't exist's.

cbbool cbHasPath (  cbcchr *  p_path  ) 
 

cbbool cbIsAbsPath (  cbcchr *  p_path  ) 
 

cbbool cbIsFileReadOnly (  cbcchr *  p_fileName  ) 
 

Checks if a file is read only or not.

Parameters:
p_fileName Pointer to the string with the filename. If this parameter is invalid, we returns also cbTRUE.
Returns:
cbTRUE if the file is read only, else cbFALSE.

cbbool cbIsRelPath (  cbcchr *  p_path  ) 
 

cbString cbMakeAbsPath (  cbcchr *  p_refPath,
cbcchr *  p_fileName
) 
 

cbString cbMakeRelPath (  cbcchr *  p_refPath,
cbcchr *  p_fileName
) 
 

cbState cbRenameDir (  cbcchr *  p_newName,
cbcchr *  p_oldName
) 
 

cbState cbRenameFile (  cbcchr *  p_newName,
cbcchr *  p_oldName,
cbeFileFlags  flags
) 
 


Generated on Mon Mar 8 23:29:45 2004 for CBCCL by doxygen 1.3.4