Chromium Code Reviews| 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 59 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 70 void sk_fmunmap(const void* addr, size_t length); | 70 void sk_fmunmap(const void* addr, size_t length); |
| 71 | 71 |
| 72 /** Returns true if the two point at the exact same filesystem object. */ | 72 /** Returns true if the two point at the exact same filesystem object. */ |
| 73 bool sk_fidentical(SkFILE* a, SkFILE* b); | 73 bool sk_fidentical(SkFILE* a, SkFILE* b); |
| 74 | 74 |
| 75 /** Returns the underlying file descriptor for the given file. | 75 /** Returns the underlying file descriptor for the given file. |
| 76 * The return value will be < 0 on failure. | 76 * The return value will be < 0 on failure. |
| 77 */ | 77 */ |
| 78 int sk_fileno(SkFILE* f); | 78 int sk_fileno(SkFILE* f); |
| 79 | 79 |
| 80 // Returns true if something (file, directory, ???) exists at this path. | 80 // Returns true if something (file, directory, ???) exists at this path. |
|
mtklein
2014/07/10 21:03:30
// If flags is set, only return true if that somet
bungeman-skia
2014/07/10 21:50:06
Done.
| |
| 81 bool sk_exists(const char *path); | 81 bool sk_exists(const char *path, SkFILE_Flags = (SkFILE_Flags)0); |
| 82 | 82 |
| 83 // Returns true if a directory exists at this path. | 83 // Returns true if a directory exists at this path. |
| 84 bool sk_isdir(const char *path); | 84 bool sk_isdir(const char *path); |
| 85 | 85 |
| 86 // Have we reached the end of the file? | 86 // Have we reached the end of the file? |
| 87 int sk_feof(SkFILE *); | 87 int sk_feof(SkFILE *); |
| 88 | 88 |
| 89 | 89 |
| 90 // Create a new directory at this path; returns true if successful. | 90 // Create a new directory at this path; returns true if successful. |
| 91 // If the directory already existed, this will return true. | 91 // If the directory already existed, this will return true. |
| (...skipping 45 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 137 * Return the name of the file, ignoring the directory structure. | 137 * Return the name of the file, ignoring the directory structure. |
| 138 * Behaves like python's os.path.basename. If the fullPath is | 138 * Behaves like python's os.path.basename. If the fullPath is |
| 139 * /dir/subdir/, an empty string is returned. | 139 * /dir/subdir/, an empty string is returned. |
| 140 * @param fullPath Full path to the file. | 140 * @param fullPath Full path to the file. |
| 141 * @return SkString The basename of the file - anything beyond the | 141 * @return SkString The basename of the file - anything beyond the |
| 142 * final slash, or the full name if there is no slash. | 142 * final slash, or the full name if there is no slash. |
| 143 */ | 143 */ |
| 144 static SkString SkBasename(const char* fullPath); | 144 static SkString SkBasename(const char* fullPath); |
| 145 }; | 145 }; |
| 146 #endif | 146 #endif |
| OLD | NEW |