CeresEngine 0.2.0
A game development framework
Loading...
Searching...
No Matches
FileSystem.hpp
Go to the documentation of this file.
1
2//
3// CeresEngine - A game development framework
4//
5// Created by Rogiel Sulzbach.
6// Copyright (c) 2018-2023 Rogiel Sulzbach. All rights reserved.
7//
8
9#pragma once
10
12
13#include "FileWatcher.hpp"
14
17
21
22#include <memory>
23#include <string>
24
25namespace CeresEngine {
26
28 class IFileSystem : public RefCounted<IFileSystem> {
29 public:
31 virtual ~IFileSystem();
32
35
36 public:
40
44
47 FileHandle open(const char* path);
48
65 const FileEvents& events = FileEvent::Default, bool recursive = true) = 0;
66 };
67
68} // namespace CeresEngine
A context for function object execution.
Definition ExecutionContext.hpp:90
Handle for a file or directory.
Definition FileHandle.hpp:46
Watcher that reports on changes of files or directories.
Definition FileWatcher.hpp:41
Interface for accessing file systems.
Definition FileSystem.hpp:28
virtual FileWatcher createFileWatcher(ExecutionContext &executionContext, const FileHandle &directory, const FileEvents &events=FileEvent::Default, bool recursive=true)=0
Watches a directory for changes.
virtual FileHandle open(StringView path)=0
Opens a file or directory in file system.
static IFileSystem * getLocal() noexcept
Gets the underlying platform local file system implementation.
A simple reference counter base class.
Definition SmartPtr.hpp:438
Definition Application.hpp:19
FileEvent
Type of event on the file system.
Definition FileWatcher.hpp:28
constexpr size_t hash(const T &v)
Generates a hash for the provided type.
Definition Hash.hpp:25