Home
last modified time | relevance | path

Searched refs:cachedFile (Results 1 – 6 of 6) sorted by relevance

/tools/apkzlib/src/test/java/com/android/tools/build/apkzlib/utils/
DCachedFileContentsTest.java42 CachedFileContents<Object> cachedFile = new CachedFileContents<>(f); in createFileAndCheckWithNoChanges() local
43 cachedFile.closed(cache); in createFileAndCheckWithNoChanges()
45 assertTrue(cachedFile.isValid()); in createFileAndCheckWithNoChanges()
46 assertSame(cache, cachedFile.getCache()); in createFileAndCheckWithNoChanges()
56 CachedFileContents<Object> cachedFile = new CachedFileContents<>(f); in createFileAndCheckChanges() local
57 cachedFile.closed(cache); in createFileAndCheckChanges()
61 assertFalse(cachedFile.isValid()); in createFileAndCheckChanges()
62 assertNull(cachedFile.getCache()); in createFileAndCheckChanges()
72 CachedFileContents<Object> cachedFile = new CachedFileContents<>(f); in createFileUpdateAndCheckChanges() local
73 cachedFile.closed(cache); in createFileUpdateAndCheckChanges()
[all …]
/tools/tradefederation/core/src/com/android/tradefed/build/
DFileDownloadCache.java332 File cachedFile; in internalfetchRemoteFile() local
345 cachedFile = mCacheMap.remove(remotePath); in internalfetchRemoteFile()
346 if (cachedFile == null) { in internalfetchRemoteFile()
349 cachedFile = new File(mCacheRoot, localRelativePath); in internalfetchRemoteFile()
351 mCacheMap.put(remotePath, cachedFile); in internalfetchRemoteFile()
360 && cachedFile.exists() in internalfetchRemoteFile()
361 && (cachedFile.length() == 0L in internalfetchRemoteFile()
362 || !downloader.isFresh(cachedFile, remotePath))) { in internalfetchRemoteFile()
365 cachedFile, remotePath); in internalfetchRemoteFile()
366 FileUtil.recursiveDelete(cachedFile); in internalfetchRemoteFile()
[all …]
/tools/tradefederation/core/src/com/android/tradefed/build/cache/
DPartialZipDownloadCache.java88 File cachedFile = new File(mCacheDir, key); in PartialZipDownloadCache()
89 if (cachedFile.exists()) { in PartialZipDownloadCache()
90 return cachedFile; in PartialZipDownloadCache()
109 File cachedFile = mFileCache.getIfPresent(key); in getCachedFile() local
110 if (cachedFile != null) { in getCachedFile()
112 FileUtil.hardlinkFile(cachedFile, targetFile, true); in getCachedFile()
/tools/tradefederation/core/javatests/com/android/tradefed/build/
DFileDownloadCacheTest.java235 File cachedFile = mCache.getCachedFile(REMOTE_PATH); in testFetchRemoteFile_cacheMissing() local
236 assertNotNull(cachedFile); in testFetchRemoteFile_cacheMissing()
237 boolean res = cachedFile.delete(); in testFetchRemoteFile_cacheMissing()
262 File copyFile(String remotePath, File cachedFile, File desFile) in testFetchRemoteFile_copyFailed()
265 FileUtil.deleteFile(cachedFile); in testFetchRemoteFile_copyFailed()
267 return super.copyFile(remotePath, cachedFile, desFile); in testFetchRemoteFile_copyFailed()
346 File cachedFile = mCache.getCachedFile(gsPath); in testCacheRebuild_multiSlashPath() local
348 assertNotNull(cachedFile); in testCacheRebuild_multiSlashPath()
361 assertEquals(cachedFile, cachedFileRebuilt); in testCacheRebuild_multiSlashPath()
363 FileUtil.deleteFile(cachedFile); in testCacheRebuild_multiSlashPath()
/tools/tradefederation/core/javatests/com/android/tradefed/result/
DTestDescriptionsFileTest.java62 File cachedFile = tdf.getFile(); in getFile_caching() local
64 assertThat(cachedFile).isEqualTo(file); in getFile_caching()
/tools/tradefederation/core/src/com/android/tradefed/cluster/
DClusterBuildProvider.java132 File cachedFile = retrieveFile(resource.getUrl(), cache, downloader, resourceFile); in getBuild() local
133 file = prepareTestResource(resource, createdResources, cachedFile, buildInfo); in getBuild()