TinyLib 0.1.1
Loading...
Searching...
No Matches
tl::File Class Reference

#include <File.h>

Public Member Functions

 File ()
 New file reader, path must be set with tl::File::open().
 
 File (const char *path)
 New file reader, preset with a path.
 
 ~File ()
 Nothing to clean up for now.
 
void open (const char *path)
 Open a new file path on this file.
 
void close ()
 Close the file path.
 
void read (char **data)
 Read char data from this file objects file path.
 
size_t length ()
 Get length of file data.
 

Detailed Description

Definition at line 8 of file File.h.

Constructor & Destructor Documentation

◆ File() [1/2]

tl::File::File ( )

New file reader, path must be set with tl::File::open().

Definition at line 7 of file File.cpp.

◆ File() [2/2]

tl::File::File ( const char * path)

New file reader, preset with a path.

Parameters
pathFile path to read from.

Definition at line 15 of file File.cpp.

◆ ~File()

tl::File::~File ( )

Nothing to clean up for now.

Definition at line 22 of file File.cpp.

Member Function Documentation

◆ close()

void tl::File::close ( )

Close the file path.

Definition at line 37 of file File.cpp.

◆ length()

size_t tl::File::length ( )

Get length of file data.

Returns
File length.

Definition at line 96 of file File.cpp.

◆ open()

void tl::File::open ( const char * path)

Open a new file path on this file.

Parameters
pathFile path to read from.

Definition at line 30 of file File.cpp.

◆ read()

void tl::File::read ( char ** data)

Read char data from this file objects file path.

Parameters
dataData from file will go in here. nullptr if invalid path.

Definition at line 45 of file File.cpp.


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