CeresEngine 0.2.0
A game development framework
Loading...
Searching...
No Matches
CeresEngine::Win32FileSystem Class Referencefinal

Representation of the local file system on Windows. More...

#include <CeresEngine/Platform/Win32/Win32FileSystem.hpp>

Inheritance diagram for CeresEngine::Win32FileSystem:
CeresEngine::LocalFileSystem CeresEngine::IFileSystem CeresEngine::RefCounted< IFileSystem >

Public Member Functions

 Win32FileSystem ()
 Creates a new Win32FileSystem instance.
 
 ~Win32FileSystem () final
 Destroys the Win32FileSystem instance.
 
FileHandle open (StringView path) final
 Opens a file or directory in file system.
 
FileHandle open (String &&path) final
 Opens a file or directory in file system.
 
FileWatcher createFileWatcher (ExecutionContext &executionContext, const FileHandle &directory, const FileEvents &events=FileEvent::Default, bool recursive=true) final
 Watches a directory for changes.
 
- Public Member Functions inherited from CeresEngine::LocalFileSystem
 LocalFileSystem ()
 
virtual ~LocalFileSystem ()
 
- Public Member Functions inherited from CeresEngine::IFileSystem
 IFileSystem ()
 
virtual ~IFileSystem ()
 
FileHandle open (const char *path)
 Opens a file or directory in file system.
 
- Public Member Functions inherited from CeresEngine::RefCounted< IFileSystem >
 RefCounted (Args &&... args)
 Creates a new RefCounted object and constructs a new Deleter by forwarding Args to it.
 
void retain () noexcept
 Retains the object by increment it's reference count by one.
 
bool release () noexcept
 Relases the object by decrementing it's reference count by one.
 

Private Types

using super = LocalFileSystem
 

Additional Inherited Members

- Static Public Member Functions inherited from CeresEngine::IFileSystem
static IFileSystemgetLocal () noexcept
 Gets the underlying platform local file system implementation.
 

Detailed Description

Representation of the local file system on Windows.

Member Typedef Documentation

◆ super

Constructor & Destructor Documentation

◆ Win32FileSystem()

CeresEngine::Win32FileSystem::Win32FileSystem ( )

Creates a new Win32FileSystem instance.

◆ ~Win32FileSystem()

CeresEngine::Win32FileSystem::~Win32FileSystem ( )
final

Destroys the Win32FileSystem instance.

Member Function Documentation

◆ createFileWatcher()

FileWatcher CeresEngine::Win32FileSystem::createFileWatcher ( ExecutionContext executionContext,
const FileHandle directory,
const FileEvents events = FileEvent::Default,
bool  recursive = true 
)
finalvirtual

Watches a directory for changes.

Note
The file handle must belong to the same file system as the file watcher, otherwise it will be ignored. Therefore, one file watcher object can only be used to watch files on a single file system. Also note that file watching may not supported for some file systems.
Parameters
executionContextThe execution context where the callbacks will be called from.
directoryA handle to directory that shall be watched.
eventsThe events that are watched (combination of FileEvent values).
recursiveDetermines whether the directory will be recursively watched.

Reimplemented from CeresEngine::LocalFileSystem.

◆ open() [1/2]

FileHandle CeresEngine::Win32FileSystem::open ( String &&  path)
finalvirtual

Opens a file or directory in file system.

Parameters
pathThe path to file or directory

Reimplemented from CeresEngine::LocalFileSystem.

◆ open() [2/2]

FileHandle CeresEngine::Win32FileSystem::open ( StringView  path)
finalvirtual

Opens a file or directory in file system.

Parameters
pathThe path to file or directory

Reimplemented from CeresEngine::LocalFileSystem.


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