BFLibCPP 0.1
CPP Library
Loading...
Searching...
No Matches
BF::File Class Reference

#include <file.hpp>

Inheritance diagram for BF::File:
Collaboration diagram for BF::File:

Public Member Functions

 File (const char *path, int *err)
 
virtual ~File ()
 
const char * name ()
 
const char * fullname ()
 
const char * extension ()
 
const char * directory ()
 
- Public Member Functions inherited from BF::Object
 Object ()
 
 Object (Object &obj)
 
virtual ~Object ()
 

Protected Attributes

FILE * _fileHandler
 

Additional Inherited Members

- Static Public Member Functions inherited from BF::Object
static void retain (Object *obj)
 
static void release (Object *obj)
 
static int retainCount (Object *obj)
 
static int retainCount (Object &obj)
 
- Protected Member Functions inherited from BF::Path
 Path (const char *path)
 
virtual ~Path ()
 
const char * path ()
 
const char * abspath ()
 

Constructor & Destructor Documentation

◆ File()

File::File ( const char * path,
int * err )

If path is null, an error will be returned

Here is the call graph for this function:

◆ ~File()

File::~File ( )
virtual

Member Function Documentation

◆ directory()

const char * File::directory ( )

Returns our parent directory

Recommended to copy the result once received

Here is the call graph for this function:

◆ extension()

const char * File::extension ( )

Returns the file extension of the path

an empty string will be returned if path is null

Recommended to copy the result once received

Here is the call graph for this function:

◆ fullname()

const char * File::fullname ( )

returns name with base name and extension

Recommended to copy the result once received

Here is the call graph for this function:

◆ name()

const char * File::name ( )

Returns base name of the file

If path is null, an empty string will always be returned

Recommended to copy the result once received

Here is the call graph for this function:

Member Data Documentation

◆ _fileHandler

FILE* BF::File::_fileHandler
protected

Serves as a dedicated FILE object for us.

Whenever a file is open, it is the responsibility of the creator to close the file


The documentation for this class was generated from the following files: