Home
last modified time | relevance | path

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

/tools/tradefederation/core/javatests/com/android/tradefed/util/
DZipUtilTest.java243 File targetFile; in testPartipUnzip() local
253 targetFile = new File(Paths.get(tmpDir.toString(), zipEntry.getFileName()).toString()); in testPartipUnzip()
258 targetFile, in testPartipUnzip()
263 permissions = Files.getPosixFilePermissions(targetFile.toPath()); in testPartipUnzip()
265 assertTrue(targetFile.isFile()); in testPartipUnzip()
274 targetFile = new File(Paths.get(tmpDir.toString(), zipEntry.getFileName()).toString()); in testPartipUnzip()
279 targetFile, in testPartipUnzip()
284 long crc = FileUtil.calculateCrc32(targetFile); in testPartipUnzip()
286 try (BufferedReader br = new BufferedReader(new FileReader(targetFile))) { in testPartipUnzip()
295 permissions = Files.getPosixFilePermissions(targetFile.toPath()); in testPartipUnzip()
[all …]
DRemoteZipTest.java152 File targetFile = Paths.get(destDir.getPath(), "large_text", "file.txt").toFile(); in testDownloadFilesFromZip() local
153 assertEquals(4146093769L, FileUtil.calculateCrc32(targetFile)); in testDownloadFilesFromZip()
154 targetFile = Paths.get(destDir.getPath(), "executable", "executable_file").toFile(); in testDownloadFilesFromZip()
155 assertTrue(targetFile.exists()); in testDownloadFilesFromZip()
157 targetFile = Paths.get(destDir.getPath(), "empty/empty_file").toFile(); in testDownloadFilesFromZip()
158 assertFalse(targetFile.exists()); in testDownloadFilesFromZip()
/tools/tradefederation/core/common_util/com/android/tradefed/util/
DZipUtil.java500 public static void applyPermission(File targetFile, CentralDirectoryInfo zipEntry) in applyPermission() argument
509 targetFile.toPath(), FileUtil.unixModeToPosix(zipEntry.getFilePermission())); in applyPermission()
521 public static void unzipPartialZipFolder(File targetFile, CentralDirectoryInfo zipEntry) in unzipPartialZipFolder() argument
523 unzipPartialZipFile(null, targetFile, zipEntry, null, -1); in unzipPartialZipFolder()
555 File targetFile, in unzipPartialZipFile() argument
563 targetFile.mkdir(); in unzipPartialZipFile()
569 targetFile.getParentFile().mkdirs(); in unzipPartialZipFile()
570 targetFile.createNewFile(); in unzipPartialZipFile()
574 File zipFile = targetFile; in unzipPartialZipFile()
597 unzipSymlink(zipFile, targetFile, zipEntry); in unzipPartialZipFile()
[all …]
/tools/tradefederation/core/javatests/com/android/tradefed/build/cache/
DPartialZipDownloadCacheTest.java54 File targetFile = FileUtil.createTempFile("test-name", ".config"); in testcache() local
55 targetFile.delete(); in testcache()
58 mCache.getCachedFile(targetFile, parentDir.getName() + "/test-name.config", crc); in testcache()
64 targetFile, parentDir.getName() + "/test-name.config", crc); in testcache()
67 "<configuration></configuration>", FileUtil.readStringFromFile(targetFile)); in testcache()
70 FileUtil.deleteFile(targetFile); in testcache()
/tools/tradefederation/core/src/com/android/tradefed/util/
DRemoteZip.java185 File targetFile = new File(destDir, info.getFileName()); in downloadFiles()
186 if (targetFile.exists()) { in downloadFiles()
204 File targetFile = new File(destDir, info.getFileName()); in downloadFiles() local
208 targetFile, in downloadFiles()
312 File targetFile = in unzipDownloadedCollection() local
314 if (targetFile.exists()) { in unzipDownloadedCollection()
328 targetFile, in unzipDownloadedCollection()
334 entry.getFileName(), targetFile.length()); in unzipDownloadedCollection()
342 targetFile, entry.getFileName(), Long.toString(entry.getCrc())); in unzipDownloadedCollection()
/tools/tradefederation/core/src/com/android/tradefed/build/cache/
DPartialZipDownloadCache.java105 public boolean getCachedFile(File targetFile, String fileName, String crc) { in getCachedFile() argument
111 targetFile.getParentFile().mkdirs(); in getCachedFile()
112 FileUtil.hardlinkFile(cachedFile, targetFile, true); in getCachedFile()