Searched defs:file (Results 1 - 25 of 108) sorted by relevance

12345

/packages/apps/DocumentsUI/src/com/android/documentsui/base/
H A DFiles.java5 * you may not use this file except in compliance with the License.
28 public static void deleteRecursively(File file) { argument
29 if (file.isDirectory()) {
30 for (File child : file.listFiles()) {
34 file.delete();
/packages/apps/Camera2/src/com/android/camera/util/
H A DFileUtil.java5 * you may not use this file except in compliance with the License.
24 * Common file operations.
53 * @param file The file to read
54 * @return The content of the file
57 public static byte[] readFileToByteArray(File file) throws IOException { argument
58 int length = (int) file.length();
60 FileInputStream stream = new FileInputStream(file);
/packages/apps/UnifiedEmail/src/org/apache/commons/io/filefilter/
H A DCanWriteFileFilter.java3 * contributor license agreements. See the NOTICE file distributed with
5 * The ASF licenses this file to You under the Apache License, Version 2.0
6 * (the "License"); you may not use this file except in compliance with
70 * Checks to see if the file can be written to.
72 * @param file the File to check
73 * @return <code>true</code> if the file can be
76 public boolean accept(File file) { argument
77 return file.canWrite();
H A DDirectoryFileFilter.java3 * contributor license agreements. See the NOTICE file distributed with
5 * The ASF licenses this file to You under the Apache License, Version 2.0
6 * (the "License"); you may not use this file except in compliance with
64 * Checks to see if the file is a directory.
66 * @param file the File to check
67 * @return true if the file is a directory
69 public boolean accept(File file) { argument
70 return file.isDirectory();
H A DEmptyFileFilter.java3 * contributor license agreements. See the NOTICE file distributed with
5 * The ASF licenses this file to You under the Apache License, Version 2.0
6 * (the "License"); you may not use this file except in compliance with
69 * Checks to see if the file is empty.
71 * @param file the file or directory to check
72 * @return <code>true</code> if the file or directory
75 public boolean accept(File file) { argument
76 if (file.isDirectory()) {
77 File[] files = file
[all...]
H A DFileFileFilter.java3 * contributor license agreements. See the NOTICE file distributed with
5 * The ASF licenses this file to You under the Apache License, Version 2.0
6 * (the "License"); you may not use this file except in compliance with
41 /** Singleton instance of file filter */
51 * Checks to see if the file is a file.
53 * @param file the File to check
54 * @return true if the file is a file
56 public boolean accept(File file) { argument
[all...]
H A DHiddenFileFilter.java3 * contributor license agreements. See the NOTICE file distributed with
5 * The ASF licenses this file to You under the Apache License, Version 2.0
6 * (the "License"); you may not use this file except in compliance with
66 * Checks to see if the file is hidden.
68 * @param file the File to check
69 * @return <code>true</code> if the file is
72 public boolean accept(File file) { argument
73 return file.isHidden();
H A DIOFileFilter.java3 * contributor license agreements. See the NOTICE file distributed with
5 * The ASF licenses this file to You under the Apache License, Version 2.0
6 * (the "License"); you may not use this file except in compliance with
39 * @param file the File to check
40 * @return true if this file matches the test
42 public boolean accept(File file); argument
51 * @return true if this file matches the test
H A DAbstractFileFilter.java3 * contributor license agreements. See the NOTICE file distributed with
5 * The ASF licenses this file to You under the Apache License, Version 2.0
6 * (the "License"); you may not use this file except in compliance with
38 * @param file the File to check
39 * @return true if this file matches the test
41 public boolean accept(File file) { argument
42 return accept(file.getParentFile(), file.getName());
50 * @return true if this file matches the test
57 * Provide a String representaion of this file filte
[all...]
H A DAgeFileFilter.java3 * contributor license agreements. See the NOTICE file distributed with
5 * The ASF licenses this file to You under the Apache License, Version 2.0
6 * (the "License"); you may not use this file except in compliance with
54 * Constructs a new age file filter for files equal to or older than
64 * Constructs a new age file filter for files on any one side
77 * Constructs a new age file filter for files older than (at or before)
87 * Constructs a new age file filter for files on any one side
99 * Constructs a new age file filter for files older than (at or before)
102 * @param cutoffReference the file whose last modification
110 * Constructs a new age file filte
136 accept(File file) argument
[all...]
H A DCanReadFileFilter.java3 * contributor license agreements. See the NOTICE file distributed with
5 * The ASF licenses this file to You under the Apache License, Version 2.0
6 * (the "License"); you may not use this file except in compliance with
82 * Checks to see if the file can be read.
84 * @param file the File to check.
85 * @return <code>true</code> if the file can be
88 public boolean accept(File file) { argument
89 return file.canRead();
H A DDelegateFileFilter.java3 * contributor license agreements. See the NOTICE file distributed with
5 * The ASF licenses this file to You under the Apache License, Version 2.0
6 * (the "License"); you may not use this file except in compliance with
40 * Constructs a delegate file filter around an existing FilenameFilter.
53 * Constructs a delegate file filter around an existing FileFilter.
68 * @param file the file to check
71 public boolean accept(File file) { argument
73 return fileFilter.accept(file);
75 return super.accept(file);
[all...]
H A DFalseFileFilter.java3 * contributor license agreements. See the NOTICE file distributed with
5 * The ASF licenses this file to You under the Apache License, Version 2.0
6 * (the "License"); you may not use this file except in compliance with
23 * A file filter that always returns false.
54 * @param file the file to check
57 public boolean accept(File file) { argument
H A DNameFileFilter.java3 * contributor license agreements. See the NOTICE file distributed with
5 * The ASF licenses this file to You under the Apache License, Version 2.0
6 * (the "License"); you may not use this file except in compliance with
55 * Constructs a new case-sensitive name file filter for a single name.
65 * Construct a new name file filter specifying case-sensitivity.
80 * Constructs a new case-sensitive name file filter for an array of names.
93 * Constructs a new name file filter for an array of names specifying case-sensitivity.
111 * Constructs a new case-sensitive name file filter for a list of names.
122 * Constructs a new name file filter for a list of names specifying case-sensitivity.
141 * @param file th
145 accept(File file) argument
163 accept(File file, String name) argument
[all...]
H A DNotFileFilter.java3 * contributor license agreements. See the NOTICE file distributed with
5 * The ASF licenses this file to You under the Apache License, Version 2.0
6 * (the "License"); you may not use this file except in compliance with
36 * Constructs a new file filter that NOTs the result of another filters.
51 * @param file the File to check
54 public boolean accept(File file) { argument
55 return ! filter.accept(file);
61 * @param file the File directory
65 public boolean accept(File file, String name) { argument
66 return ! filter.accept(file, nam
[all...]
/packages/services/Car/service/src/com/android/car/storagemonitoring/
H A DUfsWearInformationProvider.java5 * you may not use this file except in compliance with the License.
34 * The first line of the file contains the UFS version
50 public UfsWearInformationProvider(@NonNull File file) { argument
51 mFile = file;
59 lifetimeData = java.nio.file.Files.readAllLines(mFile.toPath());
/packages/apps/CertInstaller/src/com/android/certinstaller/
H A DUtil.java5 * you may not use this file except in compliance with the License.
80 static byte[] readFile(File file) { argument
82 byte[] data = new byte[(int) file.length()];
83 FileInputStream fis = new FileInputStream(file);
88 Log.w(TAG, "cert file read error: " + e);
93 static boolean deleteFile(File file) { argument
94 if ((file != null) && !file.delete()) {
95 Log.w(TAG, "cannot delete cert: " + file);
/packages/apps/DocumentsUI/src/com/android/documentsui/clipping/
H A DClipStore.java5 * you may not use this file except in compliance with the License.
32 * This method creates a symbolic link in the slot folder to the data file as a reference
41 ClipStorageReader createReader(File file) throws IOException; argument
/packages/apps/Gallery2/src/com/android/gallery3d/data/
H A DDownloadUtils.java5 * you may not use this file except in compliance with the License.
34 public static boolean requestDownload(JobContext jc, URL url, File file) { argument
37 fos = new FileOutputStream(file);
/packages/apps/Launcher3/src/com/android/launcher3/util/
H A DIOUtils.java5 * you may not use this file except in compliance with the License.
33 public static byte[] toByteArray(File file) throws IOException { argument
34 try (InputStream in = new FileInputStream(file)) {
/packages/apps/StorageManager/src/com/android/storagemanager/deletionhelper/
H A DDownloadsFilePreference.java5 * you may not use this file except in compliance with the License.
28 * DownloadsFilePreference is a preference representing a file in the Downloads folder with a
29 * checkbox that represents if the file should be deleted.
34 public DownloadsFilePreference(Context context, File file, IconProvider iconProvider) { argument
36 mFile = file;
38 setTitle(file.getName());
39 setItemSize(file.length());
45 // We turn off persistence because we need the file preferences to reset their check when
62 File file = getFile();
65 int comparison = Long.compare(otherFile.length(), file
[all...]
/packages/apps/StorageManager/src/com/android/storagemanager/utils/
H A DIconProvider.java5 * you may not use this file except in compliance with the License.
26 * IconProvider is a class for getting file icons. It is strongly based upon the DocumentsUI
37 * Returns an icon which represents a file with the given MIME type.
39 * @param mimeType The MIME type of the file.
46 public static String getMimeType(File file) { argument
47 String name = file.getName();
60 public static boolean isImageType(File file) { argument
61 String mimeType = getMimeType(file);
/packages/apps/Test/connectivity/sl4n/rapidjson/test/perftest/
H A Dplatformtest.cpp5 // Licensed under the MIT License (the "License"); you may not use this file except
17 // This file is for giving the performance characteristics of the platform (compiler/OS/CPU).
138 HANDLE file = CreateFile(filename_, GENERIC_READ, 0, NULL, OPEN_EXISTING, FILE_ATTRIBUTE_NORMAL, NULL); local
139 ASSERT_NE(INVALID_HANDLE_VALUE, file);
140 HANDLE mapObject = CreateFileMapping(file, NULL, PAGE_READONLY, 0, length_, NULL);
147 ASSERT_TRUE(CloseHandle(file) == TRUE);
/packages/apps/Traceur/src/com/google/android/traceur/
H A DFileSender.java5 * you may not use this file except in compliance with the License.
40 public static void postNotification(Context context, File file) { argument
43 final Uri traceUri = getUriForFile(context, file);
62 NotificationManager.from(context).notify(file.getName(), 0, builder.build());
65 public static void send(Context context, File file) { argument
68 final Uri traceUri = getUriForFile(context, file);
76 private static Uri getUriForFile(Context context, File file) { argument
77 return FileProvider.getUriForFile(context, AUTHORITY, file);
/packages/apps/UnifiedEmail/src/org/apache/commons/io/
H A DFileCleaner.java3 * contributor license agreements. See the NOTICE file distributed with
5 * The ASF licenses this file to You under the Apache License, Version 2.0
6 * (the "License"); you may not use this file except in compliance with
25 * This utility creates a background thread to handle file deletion.
26 * Each file to be deleted is registered with a handler object.
27 * When the handler object is garbage collected, the file is deleted.
49 * Track the specified file, using the provided marker, deleting the file
53 * @param file the file t
59 track(File file, Object marker) argument
75 track(File file, Object marker, FileDeleteStrategy deleteStrategy) argument
[all...]

Completed in 479 milliseconds

12345