libaegis/file.h File Reference

#include <common/nstring.h>

Go to the source code of this file.

Functions

void copy_whole_file (string_ty *from, string_ty *to, int cmt)
void copy_whole_file (const nstring &from, const nstring &to, bool cmt)
string_tyread_whole_file (string_ty *filename)
nstring read_whole_file (const nstring &filename)
int files_are_different (string_ty *f1, string_ty *f2)
bool files_are_different (const nstring &f1, const nstring &f2)
void file_from_string (string_ty *, string_ty *, int)
void cat_string_to_stdout (string_ty *)


Function Documentation

void cat_string_to_stdout ( string_ty  ) 

void copy_whole_file ( const nstring from,
const nstring to,
bool  cmt 
)

void copy_whole_file ( string_ty from,
string_ty to,
int  cmt 
)

void file_from_string ( string_ty ,
string_ty ,
int   
)

bool files_are_different ( const nstring f1,
const nstring f2 
)

The files_are_different function is used to compare two files. Works for both text and binary files.

Parameters:
f1 The path of a file to be compared.
f2 The path of a file to be compared.
Returns:
bool; true if the files are different in any way, false if the files are identical.

int files_are_different ( string_ty f1,
string_ty f2 
)

The files_are_different function is used to compare two files. Works for both text and binary files.

Parameters:
f1 The path of a file to be compared.
f2 The path of a file to be compared.
Returns:
int; non-zero (true) if the files are different in any way, zero (false) if the files are identical.

nstring read_whole_file ( const nstring filename  ) 

The read_whole_file function is used to read a file into a string. The file is assumed to be a text file.

Parameters:
filename pathname of file to be read
Returns:
Pointer to string in dynamic memory containing text of file. Any trailing white space will have been removed.
Note:
Assumes the user has already been set.

string_ty* read_whole_file ( string_ty filename  ) 

The read_whole_file function is used to read a file into a string. The file is assumed to be a text file.

Parameters:
filename pathname of file to be read
Returns:
Pointer to string in dynamic memory containing text of file. Any trailing white space will have been removed.
Note:
Assumes the user has already been set.


Generated on Wed Mar 12 23:37:37 2008 for Aegis by  doxygen 1.5.5