Duckcpp 2.1.0
Duckcpp is a high-performance c++ graphics engine.
Loading...
Searching...
No Matches
IFileList.hpp
1// Copyright (C) 2002-2012 Nikolaus Gebhardt
2// This file is part of the "Irrlicht Engine".
3// For conditions of distribution and use, see copyright notice in duckcpp/duckcpp.hpp
4
5#ifndef DCPP_I_FILE_LIST_HPP_INCLUDED
6#define DCPP_I_FILE_LIST_HPP_INCLUDED
7
8#include <duckcpp/core/engine/IReferenceCounted.hpp>
9#include <duckcpp/core/engine/path.hpp>
10
11namespace dcpp
12{
13namespace io
14{
15
17
19class IFileList : public virtual IReferenceCounted
20{
21public:
23
24 virtual dcpp::uint32_kt getFileCount() const = 0;
25
27
31 virtual const dcpp::io::path& getFileName(dcpp::uint32_kt index) const = 0;
32
34
37 virtual const dcpp::io::path& getFullFileName(dcpp::uint32_kt index) const = 0;
38
40
44
46
50
52
58 virtual dcpp::uint32_kt getID(dcpp::uint32_kt index) const = 0;
59
61
64 virtual bool isDirectory(dcpp::uint32_kt index) const = 0;
65
67
72 virtual dcpp::int32_kt findFile(const dcpp::io::path& filename, bool isFolder=false) const = 0;
73
75 virtual const dcpp::io::path& getPath() const = 0;
76
78
84
86 virtual void sort() = 0;
87};
88
89} // end namespace dcpp
90} // end namespace io
91
92#endif
Base class of most objects of the Duckcpp Engine.
Definition IReferenceCounted.hpp:46
Provides a list of files and folders.
Definition IFileList.hpp:20
virtual void sort()=0
Sorts the file list. You should call this after adding any items to the file list.
virtual dcpp::int32_kt findFile(const dcpp::io::path &filename, bool isFolder=false) const =0
Searches for a file or folder in the list.
virtual const dcpp::io::path & getFileName(dcpp::uint32_kt index) const =0
Gets the name of a file in the list, based on an index.
virtual const dcpp::io::path & getFullFileName(dcpp::uint32_kt index) const =0
Gets the full name of a file in the list including the path, based on an index.
virtual dcpp::uint32_kt addItem(const dcpp::io::path &fullPath, dcpp::uint32_kt offset, dcpp::uint32_kt size, bool isDirectory, dcpp::uint32_kt id=0)=0
Add as a file or folder to the list.
virtual const dcpp::io::path & getPath() const =0
Returns the base path of the file list.
virtual dcpp::uint32_kt getID(dcpp::uint32_kt index) const =0
Returns the ID of a file in the file list, based on an index.
virtual bool isDirectory(dcpp::uint32_kt index) const =0
Check if the file is a directory.
virtual dcpp::uint32_kt getFileCount() const =0
Get the number of files in the filelist.
virtual dcpp::uint32_kt getFileOffset(dcpp::uint32_kt index) const =0
Returns the file offset of a file in the file list, based on an index.
virtual dcpp::uint32_kt getFileSize(dcpp::uint32_kt index) const =0
Returns the size of a file in the file list, based on an index.
As of Duckcpp 1.6, position2d is a synonym for vector2d.
Definition shared_device.hpp:34
unsigned int uint32_kt
32 bit unsigned variable.
Definition irrTypes.hpp:64
signed int int32_kt
32 bit signed variable.
Definition irrTypes.hpp:72

Duckcpp    @cppfx.xyz