#1545: Merge partition space information methods from develop

This commit is contained in:
Günter Obiltschnig
2018-03-06 18:46:48 +01:00
parent 0d3c3ce4d4
commit 3f75fd539f
12 changed files with 230 additions and 0 deletions

View File

@@ -232,6 +232,15 @@ public:
/// Fills the vector with the names of all
/// files in the directory.
FileSize totalSpace() const;
/// Returns the total size in bytes of the partition containing this path.
FileSize usableSpace() const;
/// Returns the number of usable free bytes on the partition containing this path.
FileSize freeSpace() const;
/// Returns the number of free bytes on the partition containing this path.
bool operator == (const File& file) const;
bool operator != (const File& file) const;
bool operator < (const File& file) const;

View File

@@ -57,6 +57,9 @@ protected:
void removeImpl();
bool createFileImpl();
bool createDirectoryImpl();
FileSizeImpl totalSpaceImpl() const;
FileSizeImpl usableSpaceImpl() const;
FileSizeImpl freeSpaceImpl() const;
static void handleLastErrorImpl(const std::string& path);
private:

View File

@@ -57,6 +57,9 @@ protected:
void removeImpl();
bool createFileImpl();
bool createDirectoryImpl();
FileSizeImpl totalSpaceImpl() const;
FileSizeImpl usableSpaceImpl() const;
FileSizeImpl freeSpaceImpl() const;
static void handleLastErrorImpl(const std::string& path);
private:

View File

@@ -58,6 +58,9 @@ protected:
void removeImpl();
bool createFileImpl();
bool createDirectoryImpl();
FileSizeImpl totalSpaceImpl() const;
FileSizeImpl usableSpaceImpl() const;
FileSizeImpl freeSpaceImpl() const;
static void handleLastErrorImpl(const std::string& path);
private:

View File

@@ -58,6 +58,9 @@ protected:
void removeImpl();
bool createFileImpl();
bool createDirectoryImpl();
FileSizeImpl totalSpaceImpl() const;
FileSizeImpl usableSpaceImpl() const;
FileSizeImpl freeSpaceImpl() const;
static void handleLastErrorImpl(const std::string& path);
static void convertPath(const std::string& utf8Path, std::wstring& utf16Path);

View File

@@ -58,6 +58,9 @@ protected:
void removeImpl();
bool createFileImpl();
bool createDirectoryImpl();
FileSizeImpl totalSpaceImpl() const;
FileSizeImpl usableSpaceImpl() const;
FileSizeImpl freeSpaceImpl() const;
static void handleLastErrorImpl(const std::string& path);
static void convertPath(const std::string& utf8Path, std::wstring& utf16Path);