| OLD | NEW |
| 1 | 1 |
| 2 /* | 2 /* |
| 3 * Copyright 2006 The Android Open Source Project | 3 * Copyright 2006 The Android Open Source Project |
| 4 * | 4 * |
| 5 * Use of this source code is governed by a BSD-style license that can be | 5 * Use of this source code is governed by a BSD-style license that can be |
| 6 * found in the LICENSE file. | 6 * found in the LICENSE file. |
| 7 */ | 7 */ |
| 8 | 8 |
| 9 | 9 |
| 10 // TODO: add unittests for all these operations | 10 // TODO: add unittests for all these operations |
| (...skipping 23 matching lines...) Expand all Loading... |
| 34 /** Return true if the file could seek back to the beginning | 34 /** Return true if the file could seek back to the beginning |
| 35 */ | 35 */ |
| 36 bool sk_frewind(FILE*); | 36 bool sk_frewind(FILE*); |
| 37 | 37 |
| 38 size_t sk_fread(void* buffer, size_t byteCount, FILE*); | 38 size_t sk_fread(void* buffer, size_t byteCount, FILE*); |
| 39 size_t sk_fwrite(const void* buffer, size_t byteCount, FILE*); | 39 size_t sk_fwrite(const void* buffer, size_t byteCount, FILE*); |
| 40 | 40 |
| 41 char* sk_fgets(char* str, int size, FILE* f); | 41 char* sk_fgets(char* str, int size, FILE* f); |
| 42 | 42 |
| 43 void sk_fflush(FILE*); | 43 void sk_fflush(FILE*); |
| 44 void sk_fsync(FILE*); |
| 44 | 45 |
| 45 bool sk_fseek(FILE*, size_t); | 46 bool sk_fseek(FILE*, size_t); |
| 46 bool sk_fmove(FILE*, long); | 47 bool sk_fmove(FILE*, long); |
| 47 size_t sk_ftell(FILE*); | 48 size_t sk_ftell(FILE*); |
| 48 | 49 |
| 49 /** Maps a file into memory. Returns the address and length on success, NULL oth
erwise. | 50 /** Maps a file into memory. Returns the address and length on success, NULL oth
erwise. |
| 50 * The mapping is read only. | 51 * The mapping is read only. |
| 51 * When finished with the mapping, free the returned pointer with sk_fmunmap. | 52 * When finished with the mapping, free the returned pointer with sk_fmunmap. |
| 52 */ | 53 */ |
| 53 void* sk_fmmap(FILE* f, size_t* length); | 54 void* sk_fmmap(FILE* f, size_t* length); |
| (...skipping 85 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 139 * Behaves like python's os.path.dirname. If the fullPath is | 140 * Behaves like python's os.path.dirname. If the fullPath is |
| 140 * /dir/subdir/ the return will be /dir/subdir/ | 141 * /dir/subdir/ the return will be /dir/subdir/ |
| 141 * @param fullPath Full path to the file. | 142 * @param fullPath Full path to the file. |
| 142 * @return SkString The dir containing the file - anything preceding the | 143 * @return SkString The dir containing the file - anything preceding the |
| 143 * final slash, or the full name if ending in a slash. | 144 * final slash, or the full name if ending in a slash. |
| 144 */ | 145 */ |
| 145 static SkString Dirname(const char* fullPath); | 146 static SkString Dirname(const char* fullPath); |
| 146 }; | 147 }; |
| 147 | 148 |
| 148 #endif | 149 #endif |
| OLD | NEW |