Lines Matching refs:file
5 * you may not use this file except in compliance with the License.
75 SharedPreferencesImpl(File file, int mode) {
76 mFile = file;
77 mBackupFile = makeBackupFile(file);
108 Log.w(TAG, "Attempt to read preferences file " + mFile + " without permission");
158 // Has the file changed out from under us? i.e. writes that
540 private static FileOutputStream createFileOutputStream(File file) {
543 str = new FileOutputStream(file);
545 File parent = file.getParentFile();
547 Log.e(TAG, "Couldn't create directory for SharedPreferences file " + file);
555 str = new FileOutputStream(file);
557 Log.e(TAG, "Couldn't create SharedPreferences file " + file, e2);
565 // Rename the current file so it may be used as a backup during the next read
568 // If the file already exists, but no changes were
570 // re-write the file. Return as if we wrote it
577 Log.e(TAG, "Couldn't rename file " + mFile
578 + " to backup file " + mBackupFile);
587 // Attempt to write the file, delete the backup and return true as atomically as
588 // possible. If any exception occurs, delete the new file; next time we will restore
609 // Writing was successful, delete the backup file if there is one.
618 // Clean up an unsuccessfully written file
621 Log.e(TAG, "Couldn't clean up partially-written file " + mFile);