Rename DirectoryFile/FileProperty to Path, and re-use struct in OS code

* They describe directories or files, and really describe a single path
  on the remote system.
This commit is contained in:
baldurk
2017-04-18 14:57:38 +01:00
parent 637d4089e2
commit 587fba0b68
9 changed files with 77 additions and 98 deletions
+5 -3
View File
@@ -36,15 +36,17 @@ struct FloatVector
DECLARE_REFLECTION_STRUCT(FloatVector);
struct DirectoryFile
struct PathEntry
{
PathEntry() : flags(PathProperty::NoFlags), lastmod(0), size(0) {}
PathEntry(const char *fn, PathProperty f) : filename(fn), flags(f), lastmod(0), size(0) {}
rdctype::str filename;
FileProperty flags;
PathProperty flags;
uint32_t lastmod;
uint64_t size;
};
DECLARE_REFLECTION_STRUCT(DirectoryFile);
DECLARE_REFLECTION_STRUCT(PathEntry);
struct ResourceFormat
{
+1 -1
View File
@@ -296,7 +296,7 @@ struct IRemoteServer
virtual bool RemoteSupportedReplays(rdctype::array<rdctype::str> *out) = 0;
virtual rdctype::str GetHomeFolder() = 0;
virtual rdctype::array<DirectoryFile> ListFolder(const char *path) = 0;
virtual rdctype::array<PathEntry> ListFolder(const char *path) = 0;
virtual uint32_t ExecuteAndInject(const char *app, const char *workingDir, const char *cmdLine,
void *env, const CaptureOptions *opts) = 0;
+2 -2
View File
@@ -163,7 +163,7 @@ inline enum_name operator++(enum_name &a) \
#define ENUM_ARRAY_SIZE(enum_name) size_t(enum_name::Count)
enum class FileProperty : uint32_t
enum class PathProperty : uint32_t
{
NoFlags = 0x0,
Directory = 0x1,
@@ -175,7 +175,7 @@ enum class FileProperty : uint32_t
ErrorInvalidPath = 0x8000,
};
BITMASK_OPERATORS(FileProperty);
BITMASK_OPERATORS(PathProperty);
// replay_shader.h