summaryrefslogtreecommitdiff
path: root/src/os.h
blob: dda5a304a5d54497665d18cc70ef785eb9cae93e (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
// 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 {
 public:

  // 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);
};

}  // namespace art

#endif  // ART_SRC_OS_H_