Chromium Code Reviews| Index: base/platform_file.h |
| =================================================================== |
| --- base/platform_file.h (revision 175095) |
| +++ base/platform_file.h (working copy) |
| @@ -120,11 +120,20 @@ |
| // true if a new file was created [or an old one truncated to zero length to |
| // simulate a new file, which can happen with PLATFORM_FILE_CREATE_ALWAYS], and |
| // false otherwise. |error_code| can be NULL. |
| +// |
| +// This function fails with 'access denied' if the |name| contains path |
| +// traversal components. |
| BASE_EXPORT PlatformFile CreatePlatformFile(const FilePath& name, |
| int flags, |
| bool* created, |
| PlatformFileError* error_code); |
| +// Same as CreatePlatformFile but allows paths with traversal (like \..\) |
| +// components. Use only with extreme care. |
| +BASE_EXPORT PlatformFile CreatePlatformFileAllowTraversal( |
| + const FilePath& name, int flags, bool* created, |
|
brettw
2013/01/07 20:50:26
Can you horizontally align the params on different
|
| + PlatformFileError* error_code); |
| + |
| // Closes a file handle. Returns |true| on success and |false| otherwise. |
| BASE_EXPORT bool ClosePlatformFile(PlatformFile file); |