// Interface to the underlying OS platform. class OS { public: // Open an existing file with read only access. static File* OpenFileForReading(constchar* name);
// Open an existing file with read/write access. static File* OpenFileReadWrite(constchar* name);
// Create an empty file with read/write access. This is a *new* file, that is, if the file // already exists, it is *not* overwritten, but unlinked, and a new inode will be used. static File* CreateEmptyFile(constchar* name);
// Create an empty file with write access. This is a *new* file, that is, if the file // already exists, it is *not* overwritten, but unlinked, and a new inode will be used. static File* CreateEmptyFileWriteOnly(constchar* name);
// Open a file with the specified open(2) flags. static File* OpenFileWithFlags(constchar* name, int flags, bool auto_flush = true);
// Check if a file exists. staticbool FileExists(constchar* name, bool check_file_type = true);
// Check if a directory exists. staticbool DirectoryExists(constchar* name);
// Get the size of a file (or -1 if it does not exist). static int64_t GetFileSizeBytes(constchar* name);
// Open an existing file or an entry in a zip file with read only access. // `name_and_zip_entry` should be either a path to an existing file, or a path to a zip file and // the name of the zip entry, separated by `zip_separator`. // `alignment` is the expected alignment of the specified zip entry, in bytes. Only applicable if // `name_and_zip_entry` points to a zip entry. // Returns `file` being the file at the specified path and the range being the entire range of the // file, if `name_and_zip_entry` points to a file. Returns `file` being the zip file and the range // being the range of the zip entry, if `name_and_zip_entry` points to a zip entry. Returns `file` // being nullptr on failure. static FileWithRange OpenFileDirectlyOrFromZip(const std::string& name_and_zip_entry, constchar* zip_separator,
size_t alignment,
std::string* error_msg);
};
} // namespace art
#endif// ART_LIBARTBASE_BASE_OS_H_
Messung V0.5 in Prozent
¤ Die Informationen auf dieser Webseite wurden
nach bestem Wissen sorgfältig zusammengestellt. Es wird jedoch weder Vollständigkeit, noch Richtigkeit,
noch Qualität der bereit gestellten Informationen zugesichert.0.10Bemerkung:
(vorverarbeitet am 2026-06-29)
¤
Die Informationen auf dieser Webseite wurden
nach bestem Wissen sorgfältig zusammengestellt. Es wird jedoch weder Vollständigkeit, noch Richtigkeit,
noch Qualität der bereit gestellten Informationen zugesichert.
Bemerkung:
Die farbliche Syntaxdarstellung und die Messung sind noch experimentell.