Home
last modified time | relevance | path

Searched refs:destDir (Results 1 – 25 of 26) sorted by relevance

12

/tools/trebuchet/trebuchet/traceutils/src/
DTraceUtils.kt27 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/
DRemoteZipTest.java98 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 …]
DZipUtil2Test.java113 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()
DFileUtilFuncTest.java201 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/
DClusterBuildProvider.java253 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 …]
DTestOutputUploader.java73 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/
DZipUtil2.java79 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()
DFileUtil.java514 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 …]
DZipUtil.java113 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/
DBundletoolUtil.java131 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()
DRemoteZip.java174 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/
DRemoteFileResolver.java67 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()
DConfigurationFactory.java751 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()
DDynamicRemoteFileResolver.java344 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/
DTestOutputUploaderTest.java72 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/
DIncrementalImageFuncTest.java286 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/
DMixKernelTargetPreparer.java192 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/
DFileDownloadCacheWrapper.java61 File destDir, in downloadZippedFiles() argument
67 destDir, remoteFilePath, includeFilters, excludeFilters); in downloadZippedFiles()
DIFileDownloader.java96 File destDir, in downloadZippedFiles() argument
/tools/tradefederation/core/src/com/android/tradefed/config/remote/
DGcsRemoteFileResolver.java156 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/
DGsiDeviceFlashPreparer.java325 File destDir = in getRequestedFile() local
327 ZipUtil2.extractZip(sourceFile, destDir); in getRequestedFile()
328 requestedFile = FileUtil.findFile(destDir, requestedFileName); in getRequestedFile()
DGkiDeviceFlashPreparer.java778 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/
DResolvePartialDownload.java80 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/
DUiConductorTest.java368 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/
DIncrementalImageUtil.java219 File destDir = ZipUtil2.extractZipToTemp(createSnapshot, "create_snapshot"); in IncrementalImageUtil() local
220 snapshot = FileUtil.findFile(destDir, "create_snapshot"); in IncrementalImageUtil()

12