/tools/trebuchet/trebuchet/traceutils/src/ |
D | TraceUtils.kt | 27 fun validateSrcDest(source: File, destDir: File) { in <lambda>() 31 if (!destDir.exists()) { in <lambda>() 32 destDir.mkdirs() in <lambda>() 33 if (!destDir.exists() && destDir.isDirectory) { in <lambda>() 34 throw IllegalArgumentException("'$destDir' isn't a directory") in <lambda>() 80 fun extract(source: File, destDir: File) { in extract() 81 validateSrcDest(source, destDir) in extract() 86 val destFile = File(destDir, "${source.nameWithoutExtension}_$traceCount") in extract() 102 val destDir = File(args[1]) in main() constant 103 extract(source, destDir) in main()
|
/tools/tradefederation/core/javatests/com/android/tradefed/util/ |
D | RemoteZipTest.java | 98 File destDir = null; in testGetZipEntries() local 100 destDir = FileUtil.createTempDir("test"); in testGetZipEntries() 110 FileUtil.recursiveDelete(destDir); in testGetZipEntries() 121 File destDir = null; in testGetZipEntriesWithUseZip64() local 123 destDir = FileUtil.createTempDir("test"); in testGetZipEntriesWithUseZip64() 130 FileUtil.recursiveDelete(destDir); in testGetZipEntriesWithUseZip64() 136 File destDir = null; in testDownloadFilesFromZip() local 138 destDir = FileUtil.createTempDir("test"); in testDownloadFilesFromZip() 150 remoteZip.downloadFiles(destDir, files); in testDownloadFilesFromZip() 152 File targetFile = Paths.get(destDir.getPath(), "large_text", "file.txt").toFile(); in testDownloadFilesFromZip() [all …]
|
D | ZipUtil2Test.java | 113 File destDir = createTempDir("ZipUtil2Test"); in testExtractZipWithEmptyDir() local 114 ZipUtil2.extractZip(zip, destDir); in testExtractZipWithEmptyDir() 115 mTempFiles.add(destDir); in testExtractZipWithEmptyDir() 118 destDir = createTempDir("ZipUtil2Test"); in testExtractZipWithEmptyDir() 122 ZipUtil2.extractZip(zipFile, destDir); in testExtractZipWithEmptyDir() 123 mTempFiles.add(destDir); in testExtractZipWithEmptyDir() 132 final File destDir = createTempDir("ZipUtil2Test"); in testExtractZip() local 136 ZipUtil2.extractZip(zipFile, destDir); in testExtractZip() 138 for (File file : destDir.listFiles()) { in testExtractZip()
|
D | FileUtilFuncTest.java | 201 File destDir = createTempDir("dest"); in testRecursiveCopy() local 203 FileUtil.recursiveCopy(tmpParentDir, destDir); in testRecursiveCopy() 205 File subFileCopy = new File(destDir, String.format("%s%s%s", childDir.getName(), in testRecursiveCopy() 223 File destDir = createTempDir("dest"); in testRecursiveCopyToNonexistentTarget() local 224 assertTrue(destDir.delete()); in testRecursiveCopyToNonexistentTarget() 225 assertFalse(destDir.exists()); in testRecursiveCopyToNonexistentTarget() 227 FileUtil.recursiveCopy(tmpParentDir, destDir); in testRecursiveCopyToNonexistentTarget() 229 File subFileCopy = new File(destDir, String.format("%s%s%s", childDir.getName(), in testRecursiveCopyToNonexistentTarget() 231 assertTrue(destDir.exists()); in testRecursiveCopyToNonexistentTarget()
|
/tools/tradefederation/core/src/com/android/tradefed/cluster/ |
D | ClusterBuildProvider.java | 253 File destDir, 258 if (!destDir.exists()) { 259 if (!destDir.mkdirs()) { 260 CLog.e("Cannot create %s.", destDir); 265 decompressTarGzip(archive, destDir, fileNames); 276 symlinkFiles(mountDir, destDir, fileNames); 282 decompressZip(archive, destDir, fileNames); 285 private void decompressTarGzip(File archive, File destDir, List<String> fileNames) 291 TarUtil.unTar(tar, destDir); 293 TarUtil.unTar(tar, destDir, fileNames); [all …]
|
D | TestOutputUploader.java | 73 File destDir = new File(new URL(uploadUrl).getPath()); in uploadFile() local 74 destDir.mkdirs(); in uploadFile() 75 File destFile = new File(destDir, file.getName()); in uploadFile()
|
/tools/tradefederation/core/common_util/com/android/tradefed/util/ |
D | ZipUtil2.java | 79 public static void extractZip(ZipFile zipFile, File destDir) throws IOException { in extractZip() argument 84 File childFile = new File(destDir, entry.getName()); in extractZip() 85 ZipUtil.validateDestinationDir(destDir, entry.getName()); in extractZip() 115 public static void extractZip(File toUnzip, File destDir) throws IOException { in extractZip() argument 118 ZipUtil.extractZip(zipFile, destDir); in extractZip() 127 restorePermissions(zip, destDir); in extractZip() 203 private static void restorePermissions(ZipFile zipFile, File destDir) throws IOException { in restorePermissions() argument 208 File childFile = new File(destDir, entry.getName()); in restorePermissions()
|
D | FileUtil.java | 514 public static void recursiveHardlink(File sourceDir, File destDir) throws IOException { in recursiveHardlink() argument 515 recursiveHardlink(sourceDir, destDir, false); in recursiveHardlink() 530 public static void recursiveHardlink(File sourceDir, File destDir, boolean ignoreExistingFile) in recursiveHardlink() argument 532 recursiveHardlink(sourceDir, destDir, ignoreExistingFile, new HashSet<>()); in recursiveHardlink() 550 File destDir, in recursiveHardlink() argument 554 if (!destDir.isDirectory() && !destDir.mkdir()) { in recursiveHardlink() 556 destDir.getAbsolutePath())); in recursiveHardlink() 559 File destChild = new File(destDir, childFile.getName()); in recursiveHardlink() 582 public static void recursiveSymlink(File sourceDir, File destDir) throws IOException { in recursiveSymlink() argument 583 if (!destDir.isDirectory() && !destDir.mkdir()) { in recursiveSymlink() [all …]
|
D | ZipUtil.java | 113 public static void extractZip(ZipFile zipFile, File destDir) throws IOException { in extractZip() argument 117 File childFile = new File(destDir, entry.getName()); in extractZip() 118 validateDestinationDir(destDir, entry.getName()); in extractZip() 136 public static void extractZip(ZipFile zipFile, File destDir, Predicate<ZipEntry> shouldExtract) in extractZip() argument 141 File childFile = new File(destDir, entry.getName()); in extractZip() 142 validateDestinationDir(destDir, entry.getName()); in extractZip() 709 protected static void validateDestinationDir(File destDir, String filename) throws IOException { in validateDestinationDir() argument 710 String canonicalDestinationDirPath = destDir.getCanonicalPath(); in validateDestinationDir() 711 File destinationfile = new File(destDir, filename); in validateDestinationDir()
|
/tools/tradefederation/core/src/com/android/tradefed/util/ |
D | BundletoolUtil.java | 131 File destDir; in extractSplitsFromApks() local 136 destDir = new File(destDirPath, moduleName + SPLITS_KEYWORD); in extractSplitsFromApks() 137 destDir.mkdir(); in extractSplitsFromApks() 140 String outputPathArg = OUTPUT_DIR_FLAG + destDir.getAbsolutePath(); in extractSplitsFromApks() 155 FileUtil.recursiveDelete(destDir); in extractSplitsFromApks() 161 return destDir; in extractSplitsFromApks()
|
D | RemoteZip.java | 174 public void downloadFiles(File destDir, List<CentralDirectoryInfo> originalFiles) in downloadFiles() argument 185 File targetFile = new File(destDir, info.getFileName()); in downloadFiles() 204 File targetFile = new File(destDir, info.getFileName()); in downloadFiles() 263 destDir, partialZipFinal, collection)); in downloadFiles() 309 File destDir, File partialZipFile, MergedZipEntryCollection collection) { in unzipDownloadedCollection() argument 313 new File(Paths.get(destDir.toString(), entry.getFileName()).toString()); in unzipDownloadedCollection()
|
/tools/tradefederation/core/src/com/android/tradefed/config/ |
D | RemoteFileResolver.java | 67 public static ResolvedFile resolveRemoteFile(URI fileURI, URI destDir) in resolveRemoteFile() argument 69 return resolveRemoteFile(fileURI, destDir, getDefaultResolver(fileURI, new HashMap<>())); in resolveRemoteFile() 82 URI fileURI, URI destDir, IRemoteFileResolver resolver) throws BuildRetrievalError { in resolveRemoteFile() argument 85 args.setDestinationDir(new File(destDir)); in resolveRemoteFile()
|
D | ConfigurationFactory.java | 751 File destDir = FileUtil.createTempDir("tf-configs"); in internalCreateDirectConfiguration() local 753 ResolvedFile resolvedConfigFile = resolveRemoteFile(configURI, destDir.toURI()); in internalCreateDirectConfiguration() 796 FileUtil.recursiveDelete(destDir); in internalCreateDirectConfiguration() 821 protected ResolvedFile resolveRemoteFile(URI configURI, URI destDir) in resolveRemoteFile() argument 823 return RemoteFileResolver.resolveRemoteFile(configURI, destDir); in resolveRemoteFile()
|
D | DynamicRemoteFileResolver.java | 344 File destDir, in resolvePartialDownloadZip() argument 361 queryArgs.put("partial_download_dir", destDir.getAbsolutePath()); in resolvePartialDownloadZip() 375 .setDestinationDir(destDir); in resolvePartialDownloadZip()
|
/tools/tradefederation/core/javatests/com/android/tradefed/cluster/ |
D | TestOutputUploaderTest.java | 72 File destDir = tmpDir.newFolder(); in testUploadFile_fileProtocol_rootPath() local 73 String uploadUrl = "file://" + destDir.getAbsolutePath(); in testUploadFile_fileProtocol_rootPath() 85 File destDir = tmpDir.newFolder(); in testUploadFile_fileProtocol_withDestPath() local 86 String uploadUrl = "file://" + destDir.getAbsolutePath(); in testUploadFile_fileProtocol_withDestPath()
|
/tools/tradefederation/core/javatests/com/android/tradefed/targetprep/sync/ |
D | IncrementalImageFuncTest.java | 286 File destDir = ZipUtil2.extractZipToTemp(createSnapshotZip, "create_snapshot"); in getCreateSnapshot() local 287 File snapshot = FileUtil.findFile(destDir, "create_snapshot"); in getCreateSnapshot() 297 File destDir = ZipUtil2.extractZipToTemp(inspectZip, "inspect_cow_unzip"); in inspectCowPatches() local 298 File inspect = FileUtil.findFile(destDir, "inspect_cow"); in inspectCowPatches() 314 FileUtil.recursiveDelete(destDir); in inspectCowPatches()
|
/tools/tradefederation/core/test_framework/com/android/tradefed/targetprep/ |
D | MixKernelTargetPreparer.java | 192 void copyDeviceImageToDir(File srcFile, File destDir) throws IOException { in copyDeviceImageToDir() argument 210 File dstFile = new File(destDir, newFileName); in copyDeviceImageToDir() 226 void copyLabelFileToDir(String fileKey, File srcFile, File destDir) throws IOException { in copyLabelFileToDir() argument 229 File dstFile = new File(destDir, newFileName); in copyLabelFileToDir()
|
/tools/tradefederation/core/src/com/android/tradefed/build/ |
D | FileDownloadCacheWrapper.java | 61 File destDir, in downloadZippedFiles() argument 67 destDir, remoteFilePath, includeFilters, excludeFilters); in downloadZippedFiles()
|
D | IFileDownloader.java | 96 File destDir, in downloadZippedFiles() argument
|
/tools/tradefederation/core/src/com/android/tradefed/config/remote/ |
D | GcsRemoteFileResolver.java | 156 File destDir = possibleDir; in fetchResourceWithRetryParallel() local 163 ZipUtil2.extractZip(destFile, destDir); in fetchResourceWithRetryParallel() 178 destDir, futureClient); in fetchResourceWithRetryParallel()
|
/tools/tradefederation/core/src/com/android/tradefed/targetprep/ |
D | GsiDeviceFlashPreparer.java | 325 File destDir = in getRequestedFile() local 327 ZipUtil2.extractZip(sourceFile, destDir); in getRequestedFile() 328 requestedFile = FileUtil.findFile(destDir, requestedFileName); in getRequestedFile()
|
D | GkiDeviceFlashPreparer.java | 778 File destDir = in getRequestedFile() local 783 subdir = FileUtil.createNamedTempDir(destDir, subdirPathName); in getRequestedFile() 785 requestedFile = new File(subdir != null ? subdir : destDir, baseFileName); in getRequestedFile() 797 new File(subdir != null ? subdir : destDir, entry.getName()); in getRequestedFile()
|
/tools/tradefederation/core/src/com/android/tradefed/testtype/suite/ |
D | ResolvePartialDownload.java | 80 String destDir = args.remove(DESTINATION_DIR); in execute() local 108 new File(destDir), path, includeFilterList, excludeFilterList); in execute()
|
/tools/tradefederation/contrib/src/com/android/uicd/tests/ |
D | UiConductorTest.java | 368 private Path copyFile(Path srcFile, Path destDir) { in copyFile() argument 370 Files.createDirectories(destDir); in copyFile() 371 Path destFile = destDir.resolve(srcFile.getFileName()); in copyFile()
|
/tools/tradefederation/core/src/com/android/tradefed/util/image/ |
D | IncrementalImageUtil.java | 219 File destDir = ZipUtil2.extractZipToTemp(createSnapshot, "create_snapshot"); in IncrementalImageUtil() local 220 snapshot = FileUtil.findFile(destDir, "create_snapshot"); in IncrementalImageUtil()
|