Photon Engine 2.0.0-beta
A physically based renderer.
Loading...
Searching...
No Matches
Filesystem.h
Go to the documentation of this file.
1#pragma once
2
3namespace ph
4{
5
6class Path;
7
10class Filesystem final
11{
12public:
15 static bool hasDirectory(const Path& path);
16
19 static bool hasFile(const Path& path);
20
24 static void createDirectory(const Path& path);
25
30 static void createDirectories(const Path& path);
31
38 static void copyFile(
39 const Path& srcFile,
40 const Path& dstFile,
41 bool overwriteExisting = false);
42
43 static void copyFileToDirectory(
44 const Path& srcFile,
45 const Path& dstDir,
46 bool overwriteExisting = false,
47 bool createMissingDirectories = true);
48
57 static void copy(
58 const Path& srcPath,
59 const Path& dstPath,
60 bool overwriteExisting = false);
61
62 static Path makeRelative(const Path& src, const Path& base);
63};
64
65}// end namespace ph
Filesystem operations for the native operating system.
Definition Filesystem.h:11
static void copyFile(const Path &srcFile, const Path &dstFile, bool overwriteExisting=false)
Copy a file to another destination. Both paths should represent a file.
Definition Filesystem.cpp:36
static Path makeRelative(const Path &src, const Path &base)
Definition Filesystem.cpp:95
static void copyFileToDirectory(const Path &srcFile, const Path &dstDir, bool overwriteExisting=false, bool createMissingDirectories=true)
Definition Filesystem.cpp:57
static bool hasDirectory(const Path &path)
Check if the path points to an existing directory.
Definition Filesystem.cpp:12
static void createDirectories(const Path &path)
Create a directory as specified by the path. Treat the path as a directory representation and create ...
Definition Filesystem.cpp:29
static void createDirectory(const Path &path)
Create a directory as specified by the path. Similar to createDirectories(), except that the parent d...
Definition Filesystem.cpp:22
static bool hasFile(const Path &path)
Check if the path points to an existing file.
Definition Filesystem.cpp:17
static void copy(const Path &srcPath, const Path &dstPath, bool overwriteExisting=false)
Copy a file or directory recursively to another destination. If srcPath is a file,...
Definition Filesystem.cpp:71
General path representation. Does not check whether the target actually exists (e....
Definition Path.h:21
The root for all renderer implementations.
Definition EEngineProject.h:6