| Index: runtime/bin/file_win.cc
|
| diff --git a/runtime/bin/file_win.cc b/runtime/bin/file_win.cc
|
| index 8352c4901dab1774f2194a32080941542e0c8867..eaac7e656413bc775c005813cfef43a9739885f6 100644
|
| --- a/runtime/bin/file_win.cc
|
| +++ b/runtime/bin/file_win.cc
|
| @@ -88,7 +88,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 | O_BINARY;
|
| if (writable) {
|
| flags = (O_RDWR | O_CREAT | O_TRUNC | O_BINARY);
|
| @@ -101,7 +101,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 ((st.st_mode & S_IFMT) == S_IFREG);
|
| @@ -111,6 +111,15 @@ bool File::FileExists(const char* name) {
|
| }
|
|
|
|
|
| +bool File::Create(const char* name) {
|
| + int fd = open(name, O_RDONLY | O_CREAT, 0666);
|
| + if (fd < 0) {
|
| + return false;
|
| + }
|
| + return (close(fd) == 0);
|
| +}
|
| +
|
| +
|
| bool File::IsAbsolutePath(const char* pathname) {
|
| // Should we consider network paths?
|
| if (pathname == NULL) return false;
|
|
|