Lines Matching refs:FILE
3 // found in the LICENSE file.
5 // This file contains utility functions for dealing with the local
72 // Note for POSIX environments: a file created before |file_time|
73 // can be mis-detected as a newer file due to low precision of
74 // timestmap of file creation time. If you need to avoid such
96 // Deletes the given path, whether it's a file or a directory.
107 // Schedules to delete the given path, whether it's a file or a directory, until
110 // 1) The file/directory to be deleted should exist in a temp folder.
115 // Moves the given path, whether it's a file or a directory.
121 // Renames file |from_path| to |to_path|. Both paths must be on the same
122 // volume, or the function will fail. Destination file will be created
124 // temporary files. On Windows it preserves attributes of the target file.
128 // Copies a single file. Use CopyDirectory to copy directories.
137 // If you only need to copy a file use CopyFile, it's faster.
152 // Gets the creation time of the given file (expressed in the local timezone),
158 // Same as above, but takes a previously-opened file handle instead of a name.
164 // otherwise. If either file can't be read, returns false.
173 // Read the file at |path| into |contents|, returning true on success.
180 // Read exactly |bytes| bytes from file descriptor |fd|, storing the result
195 // Resolve Windows shortcut (.LNK file)
196 // This methods tries to resolve a shortcut .LNK file. If the |path| is valid
201 // Create a Windows shortcut (.LNK file)
205 // 'source' is the existing file, 'destination' is the new link file to be
219 // Update a Windows shortcut (.LNK file). This method assumes the shortcut
224 // file to be updated. 'app_id' is the app model id for the shortcut on Win7.
235 // Pins a shortcut to the Windows 7 taskbar. The shortcut file must already
255 // WARNING: DON'T USE THIS. If you want to create a temporary file, use one of
266 // Creates a temporary file. The full path is placed in |path|, and the
267 // function returns true if was successful in creating the file. The file will
271 // Same as CreateTemporaryFile but the file is created in |dir|.
275 // Create and open a temporary file. File is opened for read/write.
277 // Returns a handle to the opened file or NULL if an error occured.
278 BASE_API FILE* CreateAndOpenTemporaryFile(FilePath* path);
280 BASE_API FILE* CreateAndOpenTemporaryShmemFile(FilePath* path);
281 // Similar to CreateAndOpenTemporaryFile, but the file is created in |dir|.
282 BASE_API FILE* CreateAndOpenTemporaryFileInDir(const FilePath& dir,
304 // Returns the file size. Returns true on success.
315 // |path| must reference a file. Function will fail if |path| points to
317 // fail if |path| is a junction or symlink that points to an empty file,
322 // Given an existing file in |path|, it returns in |real_path| the path
330 // Returns information about the given file path.
348 // Wrapper for fopen-like calls. Returns non-NULL FILE* on success.
349 BASE_API FILE* OpenFile(const FilePath& filename, const char* mode);
351 // Closes file opened by OpenFile. Returns true on success.
352 BASE_API bool CloseFile(FILE* file);
354 // Truncates an open file to end at the location of the current file pointer.
356 BASE_API bool TruncateFile(FILE* file);
358 // Reads the given number of bytes from the file into the buffer. Returns
362 // Writes the given buffer into the file, overwriting any data that was
376 // A class to handle auto-closing of FILE*'s.
379 inline void operator()(FILE* x) const {
386 typedef scoped_ptr_malloc<FILE, ScopedFILEClose> ScopedFILE;
460 // Write the file info into |info|.
513 // Opens an existing file and maps it into memory. Access is restricted to
514 // read only. If this object already points to a valid memory mapped file
515 // then this method will fail and return false. If it cannot open the file,
516 // the file does not exist, or the memory mapping fails, it will return false.
519 // As above, but works with an already-opened file. MemoryMappedFile will take
520 // ownership of |file| and close it when done.
521 bool Initialize(base::PlatformFile file);
524 // Opens an existing file and maps it as an image section. Please refer to
532 // Is file_ a valid file handle that points to an open, memory mapped file?
536 // Open the given file and pass it to MapFileToMemoryInternal().
539 // Map the file to memory, set data_ to that memory address. Return true on
560 // Renames a file using the SHFileOperation API to ensure that the target file
566 // Returns whether the file has been modified since a particular date.
624 // Loads the file passed in as an image section and touches pages to avoid
626 // is passed in. If it is 0 then the whole file is paged in. The step size
634 // Broad categories of file systems as returned by statfs() on Linux.
642 FILE_SYSTEM_MEMORY, // in-memory file system
655 // Deprecated functions have been moved to this separate header file,