chrono::ChFileutils Class Reference

Description

Class with some static functions to manipulate file names and paths.

***TO DO*** use more modern programming style!

#include <ChFileutils.h>

Static Public Member Functions

static void Change_file_ext (char *fid1, const char *fid, const char *ext, int force)
 Set extension on a file identifier. More...
 
static void Cut_file_ext (char *fid)
 Cut off extension on a file identifier.
 
static void Get_file_ext (const char *fid, char *ext)
 Get extension on a file identifier.
 
static int Get_file_size (const char *fname)
 Get file size.
 
static int MakeDirectory (const char *dirname)
 Create a directory Return 0 if successful, 1 if the directory exists, -1 otherwise.
 

Member Function Documentation

void chrono::ChFileutils::Change_file_ext ( char *  fid1,
const char *  fid,
const char *  ext,
int  force 
)
static

Set extension on a file identifier.

  • force=1 forces change even if fid already has an extension
  • force=0 does not change the extension if there already is one