Home
last modified time | relevance | path

Searched refs:file (Results 1 – 25 of 410) sorted by relevance

12345678910>>...17

/tools/metalava/src/main/java/com/android/tools/metalava/
DFileReadSandbox.kt138 fun <T : File?> allowAccess(file: T): T { in allowAccess()
139 if (file == null) { in allowAccess()
140 return file in allowAccess()
142 val path = file.absolutePath in allowAccess()
144 if (file.isDirectory) { in allowAccess()
151 return file in allowAccess()
156 var parent = file.parentFile in allowAccess()
171 return file in allowAccess()
174 fun isAccessAllowed(file: File): Boolean { in isAccessAllowed()
175 if (!file.exists()) { in isAccessAllowed()
[all …]
DRewriteAnnotations.kt36 import java.nio.file.attribute.FileTime in <lambda>()
103 for (file in files) { in <lambda>() method
105 if (file.isDirectory) { in <lambda>()
106 val android = File(file, "android${File.separator}annotation/") in <lambda>()
109 val androidx = File(file, "androidx${File.separator}annotation/") in <lambda>()
117 rewriteAnnotations(file) in <lambda>()
143 private fun rewriteAnnotations(file: File) { in <lambda>()
145 file.isDirectory -> file.listFiles()?.forEach { rewriteAnnotations(it) } in <lambda>()
146 file.path.endsWith(DOT_CLASS) -> rewriteClassFile(file) in <lambda>()
147 file.path.endsWith(DOT_JAR) -> rewriteJar(file) in <lambda>()
[all …]
DSignatureFileLoader.kt28 file: File, in load()
31 return map[file] ?: run { in load()
32 val loaded = loadFromSignatureFiles(file, kotlinStyleNulls) in load()
33 map[file] = loaded in load()
39 file: File, in loadFromSignatureFiles()
43 val codebase = ApiFile.parseApi(File(file.path), kotlinStyleNulls ?: false) in loadFromSignatureFiles()
47 val message = "Unable to parse signature file $file: ${ex.message}" in loadFromSignatureFiles()
/tools/apksig/src/test/java/com/android/apksig/util/
DDataSourceFromRAFFactory.java23 @Override DataSource create(RandomAccessFile file) { in create() argument
24 return DataSources.asDataSource(file); in create()
27 @Override DataSource create(RandomAccessFile file, long offset, long size) { in create() argument
28 return DataSources.asDataSource(file, offset, size); in create()
32 @Override DataSource create(RandomAccessFile file) { in create() argument
33 return DataSources.asDataSource(file.getChannel()); in create()
36 @Override DataSource create(RandomAccessFile file, long offset, long size) { in create() argument
37 return DataSources.asDataSource(file.getChannel(), offset, size); in create()
41 abstract DataSource create(RandomAccessFile file); in create() argument
42 abstract DataSource create(RandomAccessFile file, long offset, long size); in create() argument
/tools/tradefederation/core/tests/src/com/android/tradefed/result/
DTestDescriptionsFileTest.java37 File file = tdf.getFile(); in getFile_empty() local
38 assertThat(file).isNotNull(); in getFile_empty()
39 assertThat(file.exists()).isTrue(); in getFile_empty()
40 assertThat(FileUtil.readStringFromFile(file)).isEmpty(); in getFile_empty()
49 File file = tdf.getFile(); in getFile_oneEntry() local
50 assertThat(file).isNotNull(); in getFile_oneEntry()
51 assertThat(file.exists()).isTrue(); in getFile_oneEntry()
52 assertThat(FileUtil.readStringFromFile(file)).contains(td.toString()); in getFile_oneEntry()
61 File file = tdf.getFile(); in getFile_caching() local
64 assertThat(cachedFile).isEqualTo(file); in getFile_caching()
[all …]
/tools/apkzlib/src/main/java/com/android/tools/build/apkzlib/utils/
DCachedFileContents.java58 private File file; field in CachedFileContents
88 public CachedFileContents(@Nonnull File file) { in CachedFileContents() argument
89 this.file = file; in CachedFileContents()
102 lastClosed = file.lastModified(); in closed()
103 size = file.length(); in closed()
117 if (!file.exists()) { in isValid()
121 if (valid && file.lastModified() != lastClosed) { in isValid()
125 if (valid && file.length() != size) { in isValid()
160 return Files.hash(file, Hashing.crc32()); in hashFile()
174 return file; in getFile()
/tools/tradefederation/core/common_util/com/android/tradefed/util/
DFileUtil.java38 import java.nio.file.FileAlreadyExistsException;
39 import java.nio.file.FileSystemException;
40 import java.nio.file.FileVisitOption;
41 import java.nio.file.Files;
42 import java.nio.file.Paths;
43 import java.nio.file.attribute.PosixFilePermission;
127 public static boolean mkdirsRWX(File file) { in mkdirsRWX() argument
128 File parent = file.getParentFile(); in mkdirsRWX()
140 if (file.isDirectory() || file.mkdir()) { in mkdirsRWX()
142 boolean setPerms = chmodGroupRWX(file); in mkdirsRWX()
[all …]
/tools/tradefederation/core/util-apps/ContentProvider/main/java/android/tradefed/contentprovider/
DManagedFileContentProvider.java95 File file = getFileForUri(uri); in query() local
96 if ("/".equals(file.getAbsolutePath())) { in query()
106 if (!file.exists()) { in query()
111 if (!file.isDirectory()) { in query()
114 cursor.addRow(getRow(COLUMNS, file, /* metadata= */ null)); in query()
119 File[] files = file.listFiles(); in query()
138 File file = getFileForUri(uri); in insert() local
139 if (!file.exists()) { in insert()
158 File file = getFileForUri(uri); in delete() local
159 int num = recursiveDelete(file); in delete()
[all …]
/tools/metalava/src/main/java/com/android/tools/metalava/doclava1/
DApiParseException.kt19 private var file: String? = null variable in com.android.tools.metalava.doclava1.ApiParseException
23 internal constructor(message: String, file: String, cause: Exception?) : super(message, cause) {
24 this.file = file
27 file = tokenizer.fileName
34 if (file != null) {
35 sb.append(file).append(':')
DSourcePositionInfo.kt19 private val file: String, constant in com.android.tools.metalava.doclava1.SourcePositionInfo
23 return "$file:$line" in toString()
27 val r = file.compareTo(other.file) in compareTo()
57 return SourcePositionInfo(that.file, line) in add()
/tools/tradefederation/core/global_configuration/com/android/tradefed/util/keystore/
DJSONFileKeyStoreFactory.java120 for (File file : mHostBasedJsonFiles) { in findInvalidJsonKeyStoreFiles()
121 if (!file.exists() || !file.canRead()) { in findInvalidJsonKeyStoreFiles()
122 invalidFiles.add(file.getAbsolutePath()); in findInvalidJsonKeyStoreFiles()
133 for (File file : mHostBasedJsonFiles) { in findChangedJsonKeyStoreFiles()
134 if (mLastLoadedTime < file.lastModified()) { in findChangedJsonKeyStoreFiles()
135 changedFiles.add(file.getAbsolutePath()); in findChangedJsonKeyStoreFiles()
144 for (File file : mHostBasedJsonFiles) { in createKeyStoreInternal()
145 overrideClientWithHostKeyStoreFromFile(file); in createKeyStoreInternal()
149 private void overrideClientWithHostKeyStoreFromFile(File file) throws KeyStoreException { in overrideClientWithHostKeyStoreFromFile() argument
150 JSONObject hostKeyStore = getHostKeyStoreFromFile(file); in overrideClientWithHostKeyStoreFromFile()
[all …]
/tools/tradefederation/core/proto/
Dlog_file.proto5 * you may not use this file except in compliance with the License.
21 // Represents a single log file
23 // The local path of the log file
25 // The remote path of the log file once logged
27 // The type of the log file (For example: Logcat, screenshot)
29 // Whether the file is a text file
31 // whether the file is compressed or not
33 // Size of the file in bytes
35 // The actual mime content type of the file
/tools/tradefederation/core/tests/src/com/android/tradefed/util/
DZipUtil2Test.java28 import java.nio.file.Files;
29 import java.nio.file.attribute.PosixFilePermission;
30 import java.nio.file.attribute.PosixFilePermissions;
47 for (File file : mTempFiles) { in tempFileCleanUp()
48 FileUtil.recursiveDelete(file); in tempFileCleanUp()
57 private void verifyFilePermission(File file, String permString) throws IOException { in verifyFilePermission() argument
58 Set<PosixFilePermission> actual = Files.getPosixFilePermissions(file.toPath()); in verifyFilePermission()
68 private void verifyFilePermission(File file) throws IOException { in verifyFilePermission() argument
69 verifyFilePermission(file, file.getName()); in verifyFilePermission()
96 for (File file : destDir.listFiles()) { in testExtractZip()
[all …]
/tools/apkzlib/src/main/java/com/android/tools/build/apkzlib/sign/
DZFileDataSource.java36 private final ZFile file; field in ZFileDataSource
55 public ZFileDataSource(@Nonnull ZFile file) { in ZFileDataSource() argument
56 this.file = file; in ZFileDataSource()
66 public ZFileDataSource(@Nonnull ZFile file, long offset, long size) { in ZFileDataSource() argument
69 this.file = file; in ZFileDataSource()
79 return file.directSize(); in size()
97 return new ZFileDataSource(file, this.offset + offset, size); in slice()
113 int readSize = file.directRead(chunkOffsetInFile, buf, 0, chunkSize); in feed()
135 file.directFullyRead(this.offset + offset, dest); in copyTo()
/tools/tradefederation/core/src/com/android/tradefed/cluster/
DTestOutputUploader.java55 public String uploadFile(File file, final String destinationPath) throws IOException { in uploadFile() argument
63 CLog.i("Uploading %s to %s", file.getAbsolutePath(), uploadUrl); in uploadFile()
69 final File destFile = new File(dir, file.getName()); in uploadFile()
70 FileUtil.copyFile(file, destFile); in uploadFile()
72 final List<String> cmdArgs = buildUploadCommandArgs(file, uploadUrl); in uploadFile()
84 file.getAbsolutePath(), result.getStatus()); in uploadFile()
95 return baseUrl + file.getName(); in uploadFile()
98 private List<String> buildUploadCommandArgs(File file, String uploadUrl) { in buildUploadCommandArgs() argument
104 return ArrayUtil.list("gsutil", "cp", file.getAbsolutePath(), uploadUrl); in buildUploadCommandArgs()
112 "-F file=@" + file.getAbsolutePath(), in buildUploadCommandArgs()
/tools/tradefederation/core/src/com/android/tradefed/testtype/
DNoisyDryRunTest.java72 private List<CommandLine> testCommandFile(ITestInvocationListener listener, File file) { in testCommandFile() argument
79 checkFileWithTimeout(file); in testCommandFile()
80 return parser.parseFile(file); in testCommandFile()
97 void checkFileWithTimeout(File file) throws IOException { in checkFileWithTimeout() argument
100 while (!(canRead = checkFile(file)) && currentTimeMillis() < timeout) { in checkFileWithTimeout()
101 CLog.w("Can not read %s, wait and recheck.", file.getAbsoluteFile()); in checkFileWithTimeout()
105 throw new IOException(String.format("Can not read %s.", file.getAbsoluteFile())); in checkFileWithTimeout()
110 private boolean checkFile(File file) { in checkFile() argument
111 if (!file.exists()) { in checkFile()
112 CLog.w("%s doesn't exist.", file.getAbsoluteFile()); in checkFile()
[all …]
/tools/dexter/slicer/
Dcommon.cc28 void _checkFailed(const char* expr, int line, const char* file) { in _checkFailed() argument
29 printf("\nSLICER_CHECK failed [%s] at %s:%d\n\n", expr, file, line); in _checkFailed()
40 void _weakCheckFailed(const char* expr, int line, const char* file) { in _weakCheckFailed() argument
41 auto failure_id = std::make_pair(line, file); in _weakCheckFailed()
43 printf("\nSLICER_WEAK_CHECK failed [%s] at %s:%d\n\n", expr, file, line); in _weakCheckFailed()
/tools/metalava/src/test/java/com/android/tools/metalava/
DSymlinkTest.kt78 val file = File(dir, "src/test/pkg/sub1/sub2") in <lambda>() constant
79 file.mkdirs() in <lambda>()
80 val symlink = File(file, "sub3").toPath() in <lambda>()
81 java.nio.file.Files.createSymbolicLink(symlink, dir.toPath()) in <lambda>()
83 val git = File(file, ".git").toPath() in <lambda>()
84 java.nio.file.Files.createSymbolicLink(git, dir.toPath()) in <lambda>()
DBaselineTest.kt134 val file = File(dir, "src/test/pkg/sub1/sub2") in <lambda>() constant
135 file.mkdirs() in <lambda>()
136 val symlink = File(file, "sub3").toPath() in <lambda>()
137 java.nio.file.Files.createSymbolicLink(symlink, dir.toPath()) in <lambda>()
138 val git = File(file, ".git").toPath() in <lambda>()
139 java.nio.file.Files.createSymbolicLink(git, dir.toPath()) in <lambda>()
/tools/apksig/src/main/java/com/android/apksig/internal/util/
DRandomAccessFileDataSink.java38 public RandomAccessFileDataSink(RandomAccessFile file) { in RandomAccessFileDataSink() argument
39 this(file, 0); in RandomAccessFileDataSink()
46 public RandomAccessFileDataSink(RandomAccessFile file, long startPosition) { in RandomAccessFileDataSink() argument
47 if (file == null) { in RandomAccessFileDataSink()
53 mFile = file; in RandomAccessFileDataSink()
54 mFileChannel = file.getChannel(); in RandomAccessFileDataSink()
/tools/tradefederation/core/src/com/android/tradefed/command/
DCommandFileParser.java69 CommandLine(File file, int lineNumber) { in CommandLine() argument
71 mFile = file; in CommandLine()
75 CommandLine(Collection<? extends String> c, File file, int lineNumber) { in CommandLine() argument
77 mFile = file; in CommandLine()
253 private void scanFile(File file) throws IOException, ConfigurationException { in scanFile() argument
254 if (mIncludedFiles.contains(file.getAbsolutePath())) { in scanFile()
256 CLog.v("Skipping repeated include of file %s.", file.toString()); in scanFile()
259 mIncludedFiles.add(file.getAbsolutePath()); in scanFile()
262 BufferedReader fileReader = createCommandFileReader(file); in scanFile()
273 lArgs = new CommandLine(Arrays.asList(args), file, in scanFile()
[all …]
/tools/trebuchet/core/common/src/test/kotlin/trebuchet/io/
DStringStreamTest.kt44 val file = File("${findSampleData()}/sample.ftrace") in testLineReaderOnFile() constant
45 Assert.assertTrue(file.exists()) in testLineReaderOnFile()
46 val expected = BufferedReader(FileReader(file)) in testLineReaderOnFile()
47 StreamingReader(readFile(file)).iterLines().forEach { in testLineReaderOnFile()
69 fun readFile(file: File): BufferProducer { in readFile()
70 val inputStream = file.inputStream() in readFile()
/tools/tradefederation/core/invocation_interfaces/com/android/tradefed/invoker/
DTestInformation.java204 File file = FileUtil.findFile(testsDir, fileName); in getFromEnv() local
205 if (file != null) { in getFromEnv()
206 return file; in getFromEnv()
215 File file = FileUtil.findFile(testsDir, fileName); in getFromTestsDir() local
216 if (file == null) { in getFromTestsDir()
221 file = getBuildInfo().stageRemoteFile(fileName, testsDir); in getFromTestsDir()
223 return file; in getFromTestsDir()
235 File file = FileUtil.findFile(testsDir, fileName); in getFromDependencyFolder() local
236 if (file != null) { in getFromDependencyFolder()
237 return file; in getFromDependencyFolder()
/tools/tradefederation/core/test_framework/com/android/tradefed/targetprep/
DRemoveSystemAppPreparer.java46 for (String file : mFiles) { in setUp()
47 CLog.d("Removing system app %s from /system/app", file); in setUp()
48 device.executeShellCommand(String.format("rm /system/app/%s", file)); in setUp()
49 CLog.d("Removing system app %s from /system/priv-app", file); in setUp()
50 device.executeShellCommand(String.format("rm /system/priv-app/%s", file)); in setUp()
/tools/tradefederation/core/tests/src/com/android/tradefed/command/
DCommandFileParserTest.java51 BufferedReader createCommandFileReader(File file) { in createCommandFileReader() argument
52 return new BufferedReader(new StringReader(mDataMap.get(file))); in createCommandFileReader()
67 BufferedReader createCommandFileReader(File file) { in setUp()
97 private final void assertParsedData(CommandFileParser parser, File file, in assertParsedData() argument
99 List<CommandLine> data = parser.parseFile(file); in assertParsedData()
379 BufferedReader createCommandFileReader(File file) { in testMacroParserInclude()
408 BufferedReader createCommandFileReader(File file) { in testMacroParserInclude_twice()
436 BufferedReader createCommandFileReader(File file) { in testMacroParserInclude_repeat()
464 BufferedReader createCommandFileReader(File file) { in testMacroParserInclude_parentDir()
465 if (mMockFile.equals(file)) { in testMacroParserInclude_parentDir()
[all …]

12345678910>>...17