ppsspp/Common/File/DirListing.h
Henrik Rydgård 025bcb1673 Introduce Path, start using it all over the place.
Still lots left to convert!

Convert GetSysDirectory to return Path.

More buildfixing

Remove unnecessary Path( constructors
2021-05-13 10:39:16 +02:00

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