blob: c36680dfe2c620c2488d8be98f94c2ecc3bda69b [file] [log] [blame]
// Copyright 2009 Google Inc. All Rights Reserved.
#ifndef ART_SRC_OS_H_
#define ART_SRC_OS_H_
namespace art {
// Interface to the underlying OS platform.
class File;
class OS {
// Open a file. The returned file must be deleted by the caller.
static File* OpenFile(const char* name, bool writable);
// Create a file from an already open file descriptor
static File* FileFromFd(const char* name, int fd);
// Check if a file exists.
static bool FileExists(const char* name);
// Check if a directory exists.
static bool DirectoryExists(const char* name);
} // namespace art
#endif // ART_SRC_OS_H_