Shkyera Engine
Easy to use, game engine for Python
shkyera::File Class Reference

A class representing a file in the filesystem. More...

#include <Filesystem.hpp>

Public Member Functions

 File (std::filesystem::path path)
 Constructor for a File object. More...
 
std::filesystem::path getPath () const
 Get the path to the file. More...
 
std::string getName () const
 Get the name of the file, including the extension. More...
 
std::string getNameWithoutExtension () const
 
FILE_TYPE getType () const
 Get the type of the file. More...
 

Private Attributes

std::filesystem::path _path
 The path to the file. More...
 
FILE_TYPE _type
 The type of the file. More...
 

Detailed Description

A class representing a file in the filesystem.

Constructor & Destructor Documentation

◆ File()

shkyera::File::File ( std::filesystem::path  path)

Constructor for a File object.

Parameters
pathThe path to the file.

Member Function Documentation

◆ getName()

std::string shkyera::File::getName ( ) const

Get the name of the file, including the extension.

Returns
The name of the file.

◆ getNameWithoutExtension()

std::string shkyera::File::getNameWithoutExtension ( ) const

◆ getPath()

std::filesystem::path shkyera::File::getPath ( ) const

Get the path to the file.

Returns
The path to the file.

◆ getType()

FILE_TYPE shkyera::File::getType ( ) const

Get the type of the file.

Returns
The type of the file (e.g., PYTHON, IMAGE, OTHER).

Member Data Documentation

◆ _path

std::filesystem::path shkyera::File::_path
private

The path to the file.

◆ _type

FILE_TYPE shkyera::File::_type
private

The type of the file.


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