mirror of
https://github.com/hrydgard/ppsspp.git
synced 2025-04-02 11:01:50 -04:00
Still lots left to convert! Convert GetSysDirectory to return Path. More buildfixing Remove unnecessary Path( constructors
44 lines
865 B
C++
44 lines
865 B
C++
#pragma once
|
|
|
|
#include <string>
|
|
#include <vector>
|
|
|
|
#include <stdio.h>
|
|
|
|
#include <inttypes.h>
|
|
|
|
#include "Common/File/Path.h"
|
|
|
|
namespace File {
|
|
|
|
struct FileInfo {
|
|
std::string name;
|
|
std::string fullName; // TODO: Make into Path
|
|
bool exists = false;
|
|
bool isDirectory = false;
|
|
bool isWritable = false;
|
|
uint64_t size = 0;
|
|
|
|
uint64_t atime;
|
|
uint64_t mtime;
|
|
uint64_t ctime;
|
|
uint32_t access; // st_mode & 0x1ff
|
|
|
|
bool operator <(const FileInfo &other) const;
|
|
};
|
|
|
|
bool GetFileInfo(const Path &path, FileInfo *fileInfo);
|
|
|
|
enum {
|
|
GETFILES_GETHIDDEN = 1
|
|
};
|
|
|
|
|
|
size_t GetFilesInDir(const Path &directory, std::vector<FileInfo> *files, const char *filter = nullptr, int flags = 0);
|
|
int64_t GetDirectoryRecursiveSize(const Path &path, const char *filter = nullptr, int flags = 0);
|
|
|
|
#ifdef _WIN32
|
|
std::vector<std::string> GetWindowsDrives();
|
|
#endif
|
|
|
|
} // namespace File
|