| OLD | NEW |
| 1 /* | 1 /* |
| 2 * Copyright 2006 The Android Open Source Project | 2 * Copyright 2006 The Android Open Source Project |
| 3 * | 3 * |
| 4 * Use of this source code is governed by a BSD-style license that can be | 4 * Use of this source code is governed by a BSD-style license that can be |
| 5 * found in the LICENSE file. | 5 * found in the LICENSE file. |
| 6 */ | 6 */ |
| 7 | 7 |
| 8 #include "SkOSFile.h" | 8 #include "SkOSFile.h" |
| 9 #include "SkTypes.h" | 9 #include "SkTypes.h" |
| 10 | 10 |
| 11 #include <errno.h> | 11 #include <errno.h> |
| 12 #include <stdio.h> | 12 #include <stdio.h> |
| 13 #include <sys/stat.h> | 13 #include <sys/stat.h> |
| 14 | 14 |
| 15 #ifdef SK_BUILD_FOR_UNIX |
| 16 #include <unistd.h> |
| 17 #endif |
| 18 |
| 15 #ifdef _WIN32 | 19 #ifdef _WIN32 |
| 16 #include <direct.h> | 20 #include <direct.h> |
| 17 #include <io.h> | 21 #include <io.h> |
| 18 #endif | 22 #endif |
| 19 | 23 |
| 20 #ifdef SK_BUILD_FOR_IOS | 24 #ifdef SK_BUILD_FOR_IOS |
| 21 #import <CoreFoundation/CoreFoundation.h> | 25 #import <CoreFoundation/CoreFoundation.h> |
| 22 | 26 |
| 23 static FILE* ios_open_from_bundle(const char path[], const char* perm) { | 27 static FILE* ios_open_from_bundle(const char path[], const char* perm) { |
| 24 // Get a reference to the main bundle | 28 // Get a reference to the main bundle |
| (...skipping 174 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 199 #else | 203 #else |
| 200 retval = mkdir(path, 0777); | 204 retval = mkdir(path, 0777); |
| 201 #endif | 205 #endif |
| 202 if (0 == retval) { | 206 if (0 == retval) { |
| 203 return true; | 207 return true; |
| 204 } else { | 208 } else { |
| 205 fprintf(stderr, "sk_mkdir: error %d creating dir '%s'\n", errno, path); | 209 fprintf(stderr, "sk_mkdir: error %d creating dir '%s'\n", errno, path); |
| 206 return false; | 210 return false; |
| 207 } | 211 } |
| 208 } | 212 } |
| OLD | NEW |