src/sgp/FileMan.cc
/** Open file for writing.
 * If file is missing it will be created.
 * If file exists, it's content will be removed. */
Open file for writing.
If file is missing it will be created.
If file exists, it's content will be removed.
Open file for writing . If file is missing it will be created . If file exists it ' s content will be removed .
SGPFile* FileMan::openForWriting(const char *filename, bool truncate)
{
	int mode;
	const char* fmode = GetFileOpenModes(FILE_ACCESS_WRITE, &mode);
	if(truncate)
	{
		mode |= O_TRUNC;
	}
	int d = open3(filename, mode | O_CREAT, 0600);
	return getSGPFileFromFD(d, filename, fmode);
}
SGPFile * FileMan :: openForWriting ( const char * filename , bool truncate ) { int mode ; const char * fmode = GetFileOpenModes ( FILE_ACCESS_WRITE , & mode ) ; if ( truncate ) { mode |= O_TRUNC ; } int d = open3 ( filename , mode | O_CREAT , 0600 ) ; return getSGPFileFromFD ( d , filename , fmode ) ; }
Open file for writing.
Open file for writing .