Home | History | Annotate | Download | only in files

Lines Matching refs:File

3 // found in the LICENSE file.
45 // Thin wrapper around an OS-level file.
50 // file system object is affected by a particular method in order to consider
55 class BASE_EXPORT File {
56 MOVE_ONLY_TYPE_FOR_CPP_03(File, RValue)
61 // a file.
64 // FLAG_EXCLUSIVE_(READ|WRITE) only grant exclusive access to the file on
67 FLAG_OPEN = 1 << 0, // Opens a file, only if it exists.
68 FLAG_CREATE = 1 << 1, // Creates a new file, only if it does not
70 FLAG_OPEN_ALWAYS = 1 << 2, // May create a new file.
71 FLAG_CREATE_ALWAYS = 1 << 3, // May overwrite an old file.
72 FLAG_OPEN_TRUNCATED = 1 << 4, // Opens a file and truncates it, only if it
126 // Used to hold information about a given file.
139 // The size of the file in bytes. Undefined when is_directory is true.
142 // True if the file corresponds to a directory.
145 // True if the file corresponds to a symbolic link.
148 // The last modified time of a file.
151 // The last accessed time of a file.
154 // The creation time of a file.
158 File();
160 // Creates or opens the given file. This will fail with 'access denied' if the
162 File(const FilePath& name, uint32 flags);
165 explicit File(PlatformFile platform_file);
168 explicit File(Error error_details);
171 File(RValue other);
173 ~File();
176 File& operator=(RValue other);
178 // Creates or opens the given file.
181 // Creates or opens the given file, allowing paths with traversal ('..')
187 // Returns true if a new file was created (or an old one truncated to zero
188 // length to simulate a new file, which can happen with
192 // Returns the OS result of opening this file. Note that the way to verify
194 // File file(name, flags);
195 // if (!file.IsValid())
202 // Destroying this object closes the file automatically.
205 // Changes current position in the file to an |offset| relative to an origin
206 // defined by |whence|. Returns the resultant current position in the file
229 // Writes the given buffer into the file at the given offset, overwritting any
233 // Ignores the offset and writes to the end of the file if the file was opened
244 // Returns the current size of this file, or a negative number on failure.
247 // Truncates the file to the given length. If |length| is greater than the
248 // current size of the file, the file is extended with zeros. If the file
255 // Updates the file times.
258 // Returns some basic information for the given file.
261 // Attempts to take an exclusive write lock on the file. Returns immediately
262 // (i.e. does not wait for another process to unlock the file). If the lock
264 // that other processes may not also take a lock on the same file with the
269 // * Locks are released by the OS on file close or process termination.
271 // * Duplicated file handles may also write to locked files.
274 // * Within a process, locking the same file (by the same or new handle)
278 // * Within a process, locking the same file (by the same or new handle)
280 // * Closing any descriptor on a given file releases the lock.
283 // Unlock a file previously locked.
298 void SetPlatformFile(PlatformFile file);