db/simple/Directory: add method IsReallyAFile()

This commit is contained in:
Max Kellermann
2019-09-02 20:15:52 +02:00
parent 5dc7cb87bb
commit 2038620bc4
2 changed files with 10 additions and 2 deletions

View File

@@ -111,6 +111,15 @@ public:
return new Directory(std::string(), nullptr);
}
/**
* Is this really a regular file which is being treated like a
* directory?
*/
bool IsReallyAFile() const noexcept {
return device == DEVICE_INARCHIVE ||
device == DEVICE_CONTAINER;
}
bool IsMount() const noexcept {
return mounted_database != nullptr;
}