Mineserver
A rewrite of Minecraft 1.8.9 in C++ !
Loading...
Searching...
No Matches
File Class Reference

File Loader Wrapper. More...

#include <file.h>

Inheritance diagram for File:
PNGFile

Public Member Functions

 File ()
 Constructs a new File object.
 
 File (std::string path)
 Construct a new File object.
 
 ~File ()
 Destroy the File object.
 
bool load ()
 Loads the data of the file into ram.
 
const std::string & getPath () const
 Get the Path object.
 
const chargetPointer () const
 Get the pointer to the data.
 
int getSize () const
 Get the size of the file stored.
 

Detailed Description

File Loader Wrapper.

Constructor & Destructor Documentation

◆ File() [1/2]

File::File ( )

Constructs a new File object.

Constructs an empty file object, really just used for the config or placeholder objects.

◆ File() [2/2]

File::File ( std::string path)

Construct a new File object.

Internally calls File::load()

Parameters
pathThe Path of the file

Member Function Documentation

◆ getPath()

const std::string & File::getPath ( ) const

Get the Path object.

Warning
The path does not assure that the data stored in this object contains the data of the file at the path.
Returns
const std::string& the path of the file

◆ getPointer()

const char * File::getPointer ( ) const

Get the pointer to the data.

Returns
const char* the pointer to the file data

◆ getSize()

int File::getSize ( ) const

Get the size of the file stored.

Returns
int the size of the file stored

◆ load()

bool File::load ( )

Loads the data of the file into ram.

Returns
true file was loaded correctly
false file was not loaded correctly

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