library/src/blockclass/BP-BlockClass.cc
// Opens a file on the filesystem with accessString permissions (aka. "r", "r+", "w").  This
// routine uses the internal block file pointer
Opens a file on the filesystem with accessString permissions (aka.
Opens a file on the filesystem with accessString permissions ( aka .
int Block::File_Open(char *rootDirPath, char *accessString)
{
	if(!rootDirPath || !accessString)
		return ERR_FAILURE;
	if(this->file)
		this->File_Close();
	this->file = fopen(rootDirPath, accessString);
	if (!file)
		return ERR_FAILURE;
	return ERR_SUCCESS;
}
int Block :: File_Open ( char * rootDirPath , char * accessString ) { if ( ! rootDirPath || ! accessString ) return ERR_FAILURE ; if ( this -> file ) this -> File_Close ( ) ; this -> file = fopen ( rootDirPath , accessString ) ; if ( ! file ) return ERR_FAILURE ; return ERR_SUCCESS ; }
Opens a file on the filesystem with accessString permissions (aka.
Opens a file on the filesystem with accessString permissions ( aka .
// ensure we have valid pointers // if we already have a file open in this block, close it first // attempt to open the file // check to see if the file was opened ok // return indicating success