Lines Matching refs:file
3 // found in the LICENSE file.
5 // This file contains utility functions for dealing with the local
24 #include "base/files/file.h"
54 // Deletes the given path, whether it's a file or a directory.
59 // to attempt to delete a file that does not exist.
62 // the symlink. (even if the symlink points to a non-existent file)
69 // Schedules to delete the given path, whether it's a file or a directory, until
72 // 1) The file/directory to be deleted should exist in a temp folder.
77 // Renames file |from_path| to |to_path|. Both paths must be on the same
78 // volume, or the function will fail. Destination file will be created
80 // temporary files. On Windows it preserves attributes of the target file.
98 // otherwise. If either file can't be read, returns false.
105 // Reads the file at |path| into |contents| and returns true on success and
109 // file before the error occurred.
114 // Reads the file at |path| into |contents| and returns true on success and
118 // file before the error occurred. When the file size exceeds |max_size|, the
119 // function returns false with |contents| holding the file truncated to
130 // returns the file-descriptor wrapped in a ScopedFD rather than a File.
146 // Bits and masks of the file permission.
164 // Reads the permission of the given |path|, storing the file permission
166 // a file which the symlink points to.
169 // the permission of a file which the symlink points to.
185 // Returns a new temporary file in |dir| with a unique name. On success,
186 // |temp_file| is populated with the full path to the created file.
213 // Returns the file size. Returns true on success.
218 // |path| must reference a file. Function will fail if |path| points to
220 // fail if |path| is a junction or symlink that points to an empty file,
232 // Given an existing file in |path|, set |real_path| to the path
239 // This function will return if the given file is a symlink or not.
242 // Returns information about the given file path.
246 // underlying file descriptor (POSIX) or handle (Windows) is unconditionally
250 // Closes file opened by OpenFile. Returns true on success.
251 bool CloseFile(FILE* file);
255 FILE* FileToFILE(File file, const char* mode);
257 // Truncates an open file to end at the location of the current file pointer.
259 bool TruncateFile(FILE* file);
261 // Reads at most the given number of bytes from the file into the buffer.
265 // Writes the given buffer into the file, overwriting any data that was
318 // This is useful for checking that a config file is administrator-controlled.
342 // Broad categories of file systems as returned by statfs() on Linux.
350 FILE_SYSTEM_MEMORY, // in-memory file system