some PIFile functionality

PIBinaryLog::close fix
This commit is contained in:
2022-12-26 14:09:05 +03:00
parent 81cbf905ba
commit f355cfc05e
6 changed files with 27 additions and 1 deletions

View File

@@ -153,6 +153,16 @@ PIString PIFile::FileInfo::dir() const {
}
bool PIFile::FileInfo::isAbsolute() const {
if (path.isEmpty()) return false;
if (path[0] == '/') return true;
if (path.size() >= 2) {
if (path[0].isAlpha() && path[1] == ':') return true;
}
return false;
}
PIFile::PIFile(): PIIODevice() {}