| Index: runtime/bin/file_macos.cc
|
| diff --git a/runtime/bin/file_macos.cc b/runtime/bin/file_macos.cc
|
| index acdc140bd5bc6e8cb084d0179f24c00743667b3c..8f5c747c26a35b32a978e52017ab836787b3ba83 100644
|
| --- a/runtime/bin/file_macos.cc
|
| +++ b/runtime/bin/file_macos.cc
|
| @@ -92,7 +92,7 @@ off_t File::Length() {
|
| }
|
|
|
|
|
| -File* File::OpenFile(const char* name, bool writable) {
|
| +File* File::Open(const char* name, bool writable) {
|
| int flags = O_RDONLY;
|
| if (writable) {
|
| flags = (O_RDWR | O_CREAT | O_TRUNC);
|
| @@ -105,7 +105,7 @@ File* File::OpenFile(const char* name, bool writable) {
|
| }
|
|
|
|
|
| -bool File::FileExists(const char* name) {
|
| +bool File::Exists(const char* name) {
|
| struct stat st;
|
| if (stat(name, &st) == 0) {
|
| return S_ISREG(st.st_mode); // Deal with symlinks?
|
| @@ -120,6 +120,15 @@ bool File::IsAbsolutePath(const char* pathname) {
|
| }
|
|
|
|
|
| +bool File::Create(const char* name) {
|
| + int fd = open(name, O_RDONLY | O_CREAT, 0666);
|
| + if (fd < 0) {
|
| + return false;
|
| + }
|
| + return (close(fd) == 0);
|
| +}
|
| +
|
| +
|
| char* File::GetCanonicalPath(const char* pathname) {
|
| char* abs_path = NULL;
|
| if (pathname != NULL) {
|
|
|