Home
last modified time | relevance | path

Searched refs:File (Results 1 – 25 of 601) sorted by relevance

12345678910>>...25

/frameworks/base/core/java/android/os/
DEnvironment.java26 import java.io.File;
53 private static final File DIR_ANDROID_ROOT = getDirectory(ENV_ANDROID_ROOT, "/system");
54 private static final File DIR_ANDROID_DATA = getDirectory(ENV_ANDROID_DATA, "/data");
55 private static final File DIR_ANDROID_STORAGE = getDirectory(ENV_ANDROID_STORAGE, "/storage");
56 private static final File DIR_OEM_ROOT = getDirectory(ENV_OEM_ROOT, "/oem");
57 private static final File DIR_VENDOR_ROOT = getDirectory(ENV_VENDOR_ROOT, "/vendor");
82 public File[] getExternalDirs() { in getExternalDirs()
85 final File[] files = new File[volumes.length]; in getExternalDirs()
93 public File getExternalStorageDirectory() { in getExternalStorageDirectory()
98 public File getExternalStoragePublicDirectory(String type) { in getExternalStoragePublicDirectory()
[all …]
DFileUtils.java32 import java.io.File;
73 private static final File[] EMPTY = new File[0];
83 public static int setPermissions(File path, int mode, int uid, int gid) { in setPermissions()
171 public static boolean copyFile(File srcFile, File destFile) { in copyFile()
190 public static boolean copyToFile(InputStream inputStream, File destFile) { in copyToFile()
220 public static boolean isFilenameSafe(File file) { in isFilenameSafe()
235 public static String readTextFile(File file, int max, String ellipsis) throws IOException { in readTextFile()
311 public static long checksumCrc32(File file) throws FileNotFoundException, IOException { in checksumCrc32()
340 public static boolean deleteOlderFiles(File dir, int minCount, long minAge) { in deleteOlderFiles()
345 final File[] files = dir.listFiles(); in deleteOlderFiles()
[all …]
/frameworks/data-binding/compiler/src/main/java/android/databinding/tool/
DMakeCopy.java26 import java.io.File;
54 .replace('.', File.separatorChar);
57 public boolean accept(File dir, String name) {
64 public boolean accept(File dir, String name) {
91 new File(args[MANIFEST_INDEX + indexOffset])); in main()
105 final File srcDir = new File(args[SRC_INDEX + indexOffset], APP_SUBPATH); in main()
110 final File resTarget = new File(args[RES_OUT_INDEX + indexOffset]); in main()
115 final File xmlDir = new File(args[XML_INDEX + indexOffset]); in main()
129 final File resDir = new File(args[i]); in main()
154 private static Document readAndroidManifest(File manifest) { in readAndroidManifest()
[all …]
/frameworks/data-binding/compilationTests/src/test/java/android/databinding/compilationTest/
DBaseCompilationTest.java28 import java.io.File;
70 protected final File testFolder = new File("./build/build-test");
73 copyResourceTo(name, new File(testFolder, path)); in copyResourceTo()
78 copyResourceTo(name, new File(testFolder, path), replacements); in copyResourceTo()
86 File folder = new File(dir.toURI()); in copyResourceDirectory()
88 File target = new File(testFolder, targetPath); in copyResourceDirectory()
90 for (File item : FileUtils.listFiles(folder, null, true)) { in copyResourceDirectory()
96 copyResourceTo(name + "/" + resourcePath, new File(target, resourcePath)); in copyResourceDirectory()
116 File file = new File(testFolder, pathInApp); in extract()
138 protected void copyResourceTo(String name, File targetFile) throws IOException { in copyResourceTo()
[all …]
/frameworks/base/core/tests/coretests/src/android/os/
DFileUtilsTest.java33 import java.io.File;
44 private File mDir;
45 private File mTestFile;
46 private File mCopyFile;
47 private File mTarget;
54 mTestFile = new File(mDir, "test.file"); in setUp()
55 mCopyFile = new File(mDir, "copy.file"); in setUp()
86 assertTrue(FileUtils.isFilenameSafe(new File("foobar"))); in testIsFilenameSafe()
87 assertTrue(FileUtils.isFilenameSafe(new File("a_b-c=d.e/0,1+23"))); in testIsFilenameSafe()
88 assertFalse(FileUtils.isFilenameSafe(new File("foo*bar"))); in testIsFilenameSafe()
[all …]
/frameworks/base/core/java/com/android/internal/backup/
DLocalTransport.java41 import java.io.File;
75 private File mDataDir = new File(Environment.getDownloadCacheDirectory(), "backup");
76 private File mCurrentSetDir = new File(mDataDir, Long.toString(CURRENT_SET_TOKEN));
77 private File mCurrentSetIncrementalDir = new File(mCurrentSetDir, INCREMENTAL_DIR);
78 private File mCurrentSetFullDir = new File(mCurrentSetDir, FULL_DATA_DIR);
83 private File mRestoreSetDir;
84 private File mRestoreSetIncrementalDir;
85 private File mRestoreSetFullDir;
171 File packageDir = new File(mCurrentSetIncrementalDir, packageInfo.packageName); in performBackup()
185 File entityFile = new File(packageDir, base64Key); in performBackup()
[all …]
/frameworks/base/tools/layoutlib/bridge/tests/src/com/android/layoutlib/bridge/intensive/
DMain.java45 import java.io.File;
112 if (platformDir != null && !platformDir.isEmpty() && new File(platformDir).isDirectory()) { in getPlatformDir()
118 platformDir = getPlatformDirFromHostOut(new File(androidHostOut)); in getPlatformDir()
124 File workingDir = new File(workingDirString); in getPlatformDir()
132 File currentDir = workingDir; in getPlatformDir()
146 private static String getPlatformDirFromRoot(File root) { in getPlatformDirFromRoot()
150 File out = new File(root, "out"); in getPlatformDirFromRoot()
154 File host = new File(out, "host"); in getPlatformDirFromRoot()
158 File[] hosts = host.listFiles(new FileFilter() { in getPlatformDirFromRoot()
160 public boolean accept(File path) { in getPlatformDirFromRoot()
[all …]
/frameworks/support/v4/java/android/support/v4/content/
DContextCompat.java32 import java.io.File;
159 public static File[] getObbDirs(Context context) { in getObbDirs()
164 final File single; in getObbDirs()
171 return new File[] { single }; in getObbDirs()
219 public static File[] getExternalFilesDirs(Context context, String type) { in getExternalFilesDirs()
224 final File single; in getExternalFilesDirs()
231 return new File[] { single }; in getExternalFilesDirs()
279 public static File[] getExternalCacheDirs(Context context) { in getExternalCacheDirs()
284 final File single; in getExternalCacheDirs()
291 return new File[] { single }; in getExternalCacheDirs()
[all …]
DFileProvider.java40 import java.io.File;
317 private static final File DEVICE_ROOT = new File("/");
375 public static Uri getUriForFile(Context context, String authority, File file) { in getUriForFile()
412 final File file = mStrategy.getFileForUri(uri); in query()
451 final File file = mStrategy.getFileForUri(uri); in getType()
497 final File file = mStrategy.getFileForUri(uri); in delete()
519 final File file = mStrategy.getFileForUri(uri); in openFile()
575 File target = null; in parsePathStrategy()
612 public Uri getUriForFile(File file); in getUriForFile()
617 public File getFileForUri(Uri uri); in getFileForUri()
[all …]
/frameworks/base/services/core/java/com/android/server/updates/
DSELinuxPolicyInstallReceiver.java28 import java.io.File;
70 private void installFile(File destination, BufferedInputStream stream, int length) in installFile()
77 private void deleteRecursive(File fileOrDirectory) { in deleteRecursive()
79 for (File child : fileOrDirectory.listFiles()) in deleteRecursive()
86 File tmp = new File(updateDir.getParentFile(), "tmp"); in unpackBundle()
91 installFile(new File(tmp, versionPath), stream, chunkLengths[0]); in unpackBundle()
92 installFile(new File(tmp, macPermissionsPath), stream, chunkLengths[1]); in unpackBundle()
93 installFile(new File(tmp, seappContextsPath), stream, chunkLengths[2]); in unpackBundle()
94 installFile(new File(tmp, propertyContextsPath), stream, chunkLengths[3]); in unpackBundle()
95 installFile(new File(tmp, fileContextsPath), stream, chunkLengths[4]); in unpackBundle()
[all …]
/frameworks/support/
Dsettings.gradle2 project(':support-annotations').projectDir = new File(rootDir, 'annotations')
5 project(':support-v4').projectDir = new File(rootDir, 'v4')
8 project(':support-appcompat-v7').projectDir = new File(rootDir, 'v7/appcompat')
11 project(':support-gridlayout-v7').projectDir = new File(rootDir, 'v7/gridlayout')
14 project(':support-mediarouter-v7').projectDir = new File(rootDir, 'v7/mediarouter')
17 project(':support-palette-v7').projectDir = new File(rootDir, 'v7/palette')
20 project(':support-recyclerview-v7').projectDir = new File(rootDir, 'v7/recyclerview')
23 project(':support-cardview-v7').projectDir = new File(rootDir, 'v7/cardview')
26 project(':support-preference-v7').projectDir = new File(rootDir, 'v7/preference')
29 project(':support-preference-v14').projectDir = new File(rootDir, 'v14/preference')
[all …]
/frameworks/support/tests/java/android/support/v4/content/
DFileProviderTest.java34 import java.io.File;
64 File file = buildPath(mContext.getFilesDir(), "file.test"); in testStrategyUriSimple()
84 File file = buildPath(mContext.getFilesDir(), "..", "file.test"); in testStrategyUriJumpOutside()
95 strat.addRoot("tag2", new File("/")); in testStrategyUriShortestRoot()
97 File file = buildPath(mContext.getFilesDir(), "file.test"); in testStrategyUriShortestRoot()
102 strat.addRoot("tag1", new File("/")); in testStrategyUriShortestRoot()
114 File file = buildPath(mContext.getFilesDir(), "file.test"); in testStrategyFileSimple()
138 File file = buildPath(mContext.getFilesDir(), "lol\"wat?foo&bar", "wat.txt"); in testStrategyEscaping()
151 File file = buildPath(mContext.getFilesDir(), "file.txt"); in testStrategyExtraParams()
161 File inFile = new File(mContext.getFilesDir(), "//foo//bar//"); in testStrategyExtraSeparators()
[all …]
/frameworks/multidex/library/src/android/support/multidex/
DMultiDexExtractor.java27 import java.io.File;
82 static List<File> load(Context context, ApplicationInfo applicationInfo, File dexDir, in load()
85 final File sourceApk = new File(applicationInfo.sourceDir); in load()
89 List<File> files; in load()
110 private static List<File> loadExistingExtractions(Context context, File sourceApk, File dexDir) in loadExistingExtractions()
116 final List<File> files = new ArrayList<File>(totalDexNumber); in loadExistingExtractions()
120 File extractedFile = new File(dexDir, fileName); in loadExistingExtractions()
136 private static boolean isModified(Context context, File archive, long currentCrc) { in isModified()
142 private static long getTimeStamp(File archive) { in getTimeStamp()
152 private static long getZipCrc(File archive) throws IOException { in getZipCrc()
[all …]
DMultiDex.java29 import java.io.File;
63 private static final String SECONDARY_FOLDER_NAME = "code_cache" + File.separator +
158 File dexDir = new File(applicationInfo.dataDir, SECONDARY_FOLDER_NAME); in install()
159 List<File> files = MultiDexExtractor.load(context, applicationInfo, dexDir, false); in install()
237 private static void installSecondaryDexes(ClassLoader loader, File dexDir, List<File> files) in installSecondaryDexes()
255 private static boolean checkValidZipFiles(List<File> files) { in checkValidZipFiles()
256 for (File file : files) { in checkValidZipFiles()
341 File dexDir = new File(context.getFilesDir(), OLD_SECONDARY_FOLDER_NAME); in clearOldDexDir()
344 File[] files = dexDir.listFiles(); in clearOldDexDir()
349 for (File oldFile : files) { in clearOldDexDir()
[all …]
/frameworks/data-binding/compilerCommon/src/main/java/android/databinding/tool/
DLayoutXmlProcessor.java24 import java.io.File;
56 private final List<File> mResources;
58 public LayoutXmlProcessor(String applicationPackage, List<File> resources, in LayoutXmlProcessor()
67 public static List<File> getLayoutFiles(List<File> resources) { in getLayoutFiles()
68 List<File> result = new ArrayList<File>(); in getLayoutFiles()
69 for (File resource : resources) { in getLayoutFiles()
74 for (File layoutFolder : resource.listFiles(layoutFolderFilter)) { in getLayoutFiles()
75 for (File xmlFile : layoutFolder.listFiles(xmlFileFilter)) { in getLayoutFiles()
101 for (File xmlFile : getLayoutFiles(mResources)) { in processResources()
112 public void writeLayoutInfoFiles(File xmlOutDir) throws JAXBException { in writeLayoutInfoFiles()
[all …]
/frameworks/base/core/java/com/android/internal/util/
DFileRotator.java24 import java.io.File;
54 private final File mBasePath;
98 public FileRotator(File basePath, String prefix, long rotateAgeMillis, long deleteAgeMillis) { in FileRotator()
114 final File backupFile = new File(mBasePath, name); in FileRotator()
115 final File file = new File( in FileRotator()
124 final File noBackupFile = new File(mBasePath, name); in FileRotator()
125 final File file = new File( in FileRotator()
143 new File(mBasePath, name).delete(); in deleteAll()
160 final File file = new File(mBasePath, name); in dumpAll()
235 final File file = new File(mBasePath, name); in rewriteSingle()
[all …]
DJournaledFile.java19 import java.io.File;
32 File mReal;
33 File mTemp;
36 public JournaledFile(File real, File temp) { in JournaledFile()
47 public File chooseForRead() { in chooseForRead()
48 File result; in chooseForRead()
71 public File chooseForWrite() { in chooseForWrite()
/frameworks/data-binding/gradlePlugin/src/main/java/android/databinding/tool/
DDataBindingExportInfoTask.java23 import java.io.File;
30 private File sdkDir;
31 private File xmlOutFolder;
32 private File exportClassListTo;
50 public File getSdkDir() { in getSdkDir()
54 public void setSdkDir(File sdkDir) { in setSdkDir()
58 public File getXmlOutFolder() { in getXmlOutFolder()
62 public void setXmlOutFolder(File xmlOutFolder) { in setXmlOutFolder()
66 public File getExportClassListTo() { in getExportClassListTo()
70 public void setExportClassListTo(File exportClassListTo) { in setExportClassListTo()
/frameworks/base/core/tests/hosttests/test-apps/MultiDexLegacyTestServicesTests/src/com/android/framework/multidexlegacytestservices/test/
DServicesTests.java23 import java.io.File;
38 File targetFilesDir = getInstrumentation().getTargetContext().getFilesDir(); in testStressConcurentFirstLaunch()
40 File resultFile = new File(targetFilesDir, "Service" + i); in testStressConcurentFirstLaunch()
44 File completeFile = new File(targetFilesDir, "Service" + i + ".complete"); in testStressConcurentFirstLaunch()
73 File resultFile = new File(targetFilesDir, "Service" + i); in testStressConcurentFirstLaunch()
79 private static boolean areAllServicesRunning(File tagetFilesDir) { in areAllServicesRunning()
81 File completeFile = new File(tagetFilesDir, "Service" + i + ".complete"); in areAllServicesRunning()
/frameworks/support/v4/java/android/support/v4/provider/
DRawDocumentFile.java23 import java.io.File;
28 private File mFile;
30 RawDocumentFile(DocumentFile parent, File file) { in RawDocumentFile()
42 final File target = new File(mFile, displayName); in createFile()
54 final File target = new File(mFile, displayName); in createDirectory()
125 final File[] files = mFile.listFiles(); in listFiles()
127 for (File file : files) { in listFiles()
136 final File target = new File(mFile.getParentFile(), displayName); in renameTo()
158 private static boolean deleteContents(File dir) { in deleteContents()
159 File[] files = dir.listFiles(); in deleteContents()
[all …]
/frameworks/base/packages/SharedStorageBackup/src/com/android/sharedstoragebackup/
DObbBackupService.java30 import java.io.File;
60 File obbDir = Environment.buildExternalStorageAppObbDirs(packageName)[0];
63 ArrayList<File> obbList = allFileContents(obbDir);
71 for (File f : obbList) {
109 File outFile = Environment.buildExternalStorageAppObbDirs(packageName)[0];
111 outFile = new File(outFile, path);
128 ArrayList<File> allFileContents(File rootDir) {
129 final ArrayList<File> files = new ArrayList<File>();
130 final ArrayList<File> dirs = new ArrayList<File>();
134 File dir = dirs.remove(0);
[all …]
/frameworks/base/core/tests/coretests/src/android/content/pm/
DAppCacheTest.java34 import java.io.File;
58 void cleanUpDirectory(File pDir, String dirName) { in cleanUpDirectory()
59 File testDir = new File(pDir, dirName); in cleanUpDirectory()
65 File file = new File(testDir, fList[i]); in cleanUpDirectory()
76 File testDir = mContext.getCacheDir(); in cleanUpCacheDirectory()
87 File file = new File(testDir, fList[i]); in cleanUpCacheDirectory()
128 File cacheDir = mContext.getCacheDir(); in testFreeApplicationCacheAllFiles()
145 File cacheDir = mContext.getCacheDir(); in testFreeApplicationCacheSomeFiles()
166 public void openOutFileInAppFilesDir(File pFile, String pFileOut) { in openOutFileInAppFilesDir()
222 File file = new File(con.getCacheDir(), fileName); in testAppCacheCreateFile()
[all …]
/frameworks/base/services/core/java/com/android/server/pm/
DPackageInstallerSession.java77 import java.io.File;
108 final File stageDir;
159 private File mResolvedBaseFile;
162 private File mResolvedStageDir;
165 private final List<File> mResolvedStagedFiles = new ArrayList<>();
167 private final List<File> mResolvedInheritedFiles = new ArrayList<>();
171 private File mInheritedFilesBase;
198 File stageDir, String stageCid, boolean prepared, boolean sealed) { in PackageInstallerSession()
284 private File resolveStageDir() throws IOException { in resolveStageDir()
292 mResolvedStageDir = new File(path); in resolveStageDir()
[all …]
/frameworks/base/services/tests/servicestests/src/com/android/server/
DMountServiceTests.java34 import java.io.File;
115 private File getFilePath(String name) { in getFilePath()
116 final File filesDir = mContext.getFilesDir(); in getFilePath()
117 final File outFile = new File(filesDir, name); in getFilePath()
121 private void copyRawToFile(int rawResId, File outFile) { in copyRawToFile()
140 private void mountObb(StorageManager sm, final int resource, final File file, in mountObb()
162 final File file) { in mountObbWithoutWait()
172 private void waitForObbActionCompletion(final StorageManager sm, final File file, in waitForObbActionCompletion()
186 private String checkMountedPath(final StorageManager sm, final File file) { in checkMountedPath()
194 private void unmountObb(final StorageManager sm, final File file, int expectedState) { in unmountObb()
[all …]
/frameworks/base/packages/DefaultContainerService/src/com/android/defcontainer/
DDefaultContainerService.java55 import java.io.File;
105 final File packageFile = new File(packagePath);
135 final File packageFile = new File(packagePath);
164 final File packageFile = new File(packagePath);
210 final File dir = Environment.maybeTranslateEmulatedPathToInternal(new File(path));
237 final File directory = new File(path);
253 final File packageFile = new File(packagePath);
290 void eraseFiles(File[] paths) { in eraseFiles()
291 for (File path : paths) { in eraseFiles()
296 void eraseFiles(File path) { in eraseFiles()
[all …]

12345678910>>...25