Home
last modified time | relevance | path

Searched refs:Files (Results 1 – 25 of 99) sorted by relevance

1234

/packages/modules/GeoTZ/data_pipeline/src/test/java/com/android/timezone/location/data_pipeline/steps/
DTestSupport.java26 import java.nio.file.Files;
44 Files.createDirectories(targetDir); in copyTestResource()
53 Files.createDirectories(targetDir); in copyTestResourceWithoutLicense()
81 Files.copy(inputStream, targetResourceFile, StandardCopyOption.REPLACE_EXISTING); in copyResource()
87 return Files.createTempDirectory(testClass.getSimpleName()); in createTempDir()
91 Files.walkFileTree(dir, new SimpleFileVisitor<>() { in deleteDirectory()
95 Files.deleteIfExists(path); in deleteDirectory()
101 Files.delete(path); in deleteDirectory()
105 assertFalse(Files.exists(dir)); in deleteDirectory()
/packages/apps/Bluetooth/src/com/android/bluetooth/btservice/bluetoothKeystore/
DBluetoothKeystoreService.java32 import java.nio.file.Files;
250 if (Files.exists(Paths.get(CONFIG_CHECKSUM_ENCRYPTION_PATH))) { in loadConfigData()
267 Files.deleteIfExists(Paths.get(CONFIG_FILE_ENCRYPTION_PATH)); in loadConfigData()
400 Files.deleteIfExists(Paths.get(CONFIG_CHECKSUM_ENCRYPTION_PATH)); in cleanupFile()
401 Files.deleteIfExists(Paths.get(CONFIG_FILE_ENCRYPTION_PATH)); in cleanupFile()
402 Files.deleteIfExists(Paths.get(CONFIG_BACKUP_ENCRYPTION_PATH)); in cleanupFile()
473 Files.write(Paths.get(CONFIG_CHECKSUM_ENCRYPTION_PATH), configEncryptedLines); in saveEncryptedKey()
476 Files.write(Paths.get(CONFIG_FILE_ENCRYPTION_PATH), keyEncryptedLines); in saveEncryptedKey()
507 if (Files.exists(Paths.get(CONFIG_FILE_ENCRYPTION_PATH))) { in backupConfigEncryptionFile()
508 Files.move(Paths.get(CONFIG_FILE_ENCRYPTION_PATH), in backupConfigEncryptionFile()
[all …]
/packages/providers/MediaProvider/tests/src/com/android/providers/media/
DResolvePlaylistTest.java115 MediaStore.Files.getContentUri(MediaStore.VOLUME_EXTERNAL), in doPlaylist()
116 new String[] { MediaStore.Files.FileColumns._ID }, in doPlaylist()
117 MediaStore.Files.FileColumns.MEDIA_TYPE + "=" in doPlaylist()
118 + MediaStore.Files.FileColumns.MEDIA_TYPE_PLAYLIST, null, null)) { in doPlaylist()
194 MediaStore.Files.getContentUri(MediaStore.VOLUME_EXTERNAL), in testBrokenPlaylistM3u()
195 new String[] { MediaStore.Files.FileColumns._ID }, in testBrokenPlaylistM3u()
196 MediaStore.Files.FileColumns.MEDIA_TYPE + "=" in testBrokenPlaylistM3u()
197 + MediaStore.Files.FileColumns.MEDIA_TYPE_PLAYLIST, null, null)) { in testBrokenPlaylistM3u()
227 new String[] { MediaStore.Files.FileColumns._ID }, null, null)) { in testPlaylistDeletion()
261 new String[] { MediaStore.Files.FileColumns._ID }, null, null)) { in testPlaylistMembersDeletion()
/packages/apps/Bluetooth/tests/unit/src/com/android/bluetooth/btservice/bluetoothKeystore/
DBluetoothKeystoreServiceTest.java24 import java.nio.file.Files;
127 mConfigData = Files.readAllLines(Paths.get(CONFIG_FILE_PATH)); in setUp()
142 Files.write(Paths.get(CONFIG_FILE_PATH), mConfigData); in tearDown()
158 Files.write(Paths.get(CONFIG_FILE_PATH), data); in overwriteConfigFile()
289 Assert.assertFalse(Files.exists(Paths.get(CONFIG_CHECKSUM_ENCRYPTION_PATH))); in testParserFileAfterDisableCommonCriteriaMode()
290 Assert.assertFalse(Files.exists(Paths.get(CONFIG_FILE_ENCRYPTION_PATH))); in testParserFileAfterDisableCommonCriteriaMode()
291 Assert.assertFalse(Files.exists(Paths.get(CONFIG_BACKUP_ENCRYPTION_PATH))); in testParserFileAfterDisableCommonCriteriaMode()
/packages/services/Telephony/testapps/EmbmsTestDownloadApp/src/com/android/phone/testapps/embmsdownload/
DDownloadCompletionReceiver.java28 import java.nio.file.Files;
54 if (!Files.isDirectory(destination.getParent())) { in getDestinationFile()
55 Files.createDirectory(destination.getParent()); in getDestinationFile()
62 if (!Files.isDirectory(destination.getParent())) { in getDestinationFile()
63 Files.createDirectory(destination.getParent()); in getDestinationFile()
/packages/services/Car/tests/common_utils/src/com/android/car/test/utils/
DTemporaryDirectory.java24 import java.nio.file.Files;
44 Files.delete(path); in consume()
64 mDirectory = Files.createDirectory(directory); in TemporaryDirectory()
73 mDirectory = Files.createTempDirectory(prefix); in TemporaryDirectory()
78 Files.walkFileTree(mDirectory, DELETE); in close()
DTemporaryFile.java26 import java.nio.file.Files;
55 Files.delete(mFile.toPath()); in close()
/packages/apps/Traceur/src/com/android/traceur/
DAtraceUtils.java30 import java.nio.file.Files;
143 if (Files.isReadable(debugTracingOnPath)) { in isTracingOn()
144 tracingOnContents = Files.readAllLines(debugTracingOnPath); in isTracingOn()
145 } else if (Files.isReadable(tracingOnPath)) { in isTracingOn()
146 tracingOnContents = Files.readAllLines(tracingOnPath); in isTracingOn()
DPerfettoUtils.java24 import java.nio.file.Files;
70 Files.deleteIfExists(Paths.get(TEMP_TRACE_LOCATION)); in traceStart()
290 if (!Files.exists(Paths.get(TEMP_TRACE_LOCATION))) { in traceDump()
/packages/modules/adb/client/
Dincremental.h28 using Files = std::vector<std::string>; variable
31 bool can_install(const Files& files);
32 std::optional<Process> install(const Files& files, const Args& passthrough_args, bool silent);
Dincremental.cpp115 static unique_fd start_install(const Files& files, const Args& passthrough_args, bool silent) { in start_install()
153 bool can_install(const Files& files) { in can_install()
171 std::optional<Process> install(const Files& files, const Args& passthrough_args, bool silent) { in install()
/packages/providers/ContactsProvider/src/com/android/providers/contacts/
DCallLogProvider.java72 import java.nio.file.Files;
650 if (Files.notExists(pictureFile)) { in openFile()
690 Files.newDirectoryStream(queryDir, entry -> { in call()
691 if (Files.isDirectory(entry)) { in call()
695 (FileTime) Files.getAttribute(entry, "creationTime"); in call()
730 if (!Files.isDirectory(path)) { in getCallComposerPictureDirectory()
731 Files.createDirectory(path); in getCallComposerPictureDirectory()
740 if (!Files.isDirectory(path)) { in getCallComposerAllUsersPictureDirectory()
741 Files.createDirectory(path); in getCallComposerAllUsersPictureDirectory()
767 Files.createFile(pathToFile); in allocateNewCallComposerPicture()
[all …]
/packages/apps/Dialer/java/com/android/dialer/callcomposer/
DGalleryCursorLoader.java21 import android.provider.MediaStore.Files;
22 import android.provider.MediaStore.Files.FileColumns;
32 private static final Uri STORAGE_URI = Files.getContentUri(MEDIA_SCANNER_VOLUME_EXTERNAL);
/packages/apps/DocumentsUI/tests/functional/com/android/documentsui/archives/
DArchiveFileTestRule.java34 import java.nio.file.Files;
67 mTemporaryPath = Files.createTempDirectory( in starting()
105 Path filePath = Files.createTempFile(mTemporaryPath, mMethodName, suffix, attr); in generateFile()
124 Files.copy(inputStream, destinationPath, StandardCopyOption.REPLACE_EXISTING); in dumpAssetFile()
/packages/providers/MediaProvider/src/com/android/providers/media/util/
DLogging.java34 import java.nio.file.Files;
93 sWriter = Files.newBufferedWriter(path, CREATE, APPEND); in logPersistent()
144 try (Stream<Path> stream = Files.list(persistentDir)) { in dumpPersistent()
156 try (Stream<String> stream = Files.lines(path)) { in dumpPersistentFile()
/packages/apps/Messaging/src/com/android/messaging/datamodel/
DGalleryBoundCursorLoader.java21 import android.provider.MediaStore.Files;
22 import android.provider.MediaStore.Files.FileColumns;
34 private static final Uri STORAGE_URI = Files.getContentUri(MEDIA_SCANNER_VOLUME_EXTERNAL);
/packages/apps/Gallery2/src/com/android/photos/data/
DPhotoSetLoader.java26 import android.provider.MediaStore.Files;
27 import android.provider.MediaStore.Files.FileColumns;
38 private static final Uri CONTENT_URI = Files.getContentUri("external");
/packages/modules/GeoTZ/data_pipeline/src/test/java/com/android/timezone/location/data_pipeline/steps/mergetzs2ranges/
DMergeTzS2RangesTest.java34 import java.nio.file.Files;
76 Files.createDirectory(workingDirPath); in regressionTest()
79 Files.createDirectory(actualDirPath); in regressionTest()
/packages/modules/GeoTZ/geotz_lookup/src/test/java/com/android/timezone/location/lookup/
DGeoTimeZonesFinderTest.java30 import java.nio.file.Files;
44 Path geoDataPath = Files.createTempFile("GeoTimeZonesFinderTest", ".dat"); in setUp()
45 Files.copy(inputStream, geoDataPath, StandardCopyOption.REPLACE_EXISTING); in setUp()
/packages/services/Car/tests/EmbeddedKitchenSinkApp/src/com/google/android/car/kitchensink/storagelifetime/
DStorageLifetimeFragment.java48 import java.nio.file.Files;
121 if (Files.notExists(filePath)) { in getFilePath()
122 Files.createFile(filePath); in getFilePath()
132 Files.write(filePath, in writeBytesToFile()
/packages/providers/MediaProvider/src/com/android/providers/media/
DMediaDocumentsProvider.java57 import android.provider.MediaStore.Files;
58 import android.provider.MediaStore.Files.FileColumns;
428 Files.EXTERNAL_CONTENT_URI, ident.id); in getUriForDocumentId()
692 cursor = resolver.query(Files.EXTERNAL_CONTENT_URI, DocumentsBucketQuery.PROJECTION, in queryDocument()
694 result.setNotificationUri(resolver, Files.EXTERNAL_CONTENT_URI); in queryDocument()
700 cursor = resolver.query(Files.EXTERNAL_CONTENT_URI, DocumentQuery.PROJECTION, in queryDocument()
702 result.setNotificationUri(resolver, Files.EXTERNAL_CONTENT_URI); in queryDocument()
801 cursor = resolver.query(Files.EXTERNAL_CONTENT_URI, DocumentsBucketQuery.PROJECTION, in queryChildDocuments()
803 result.setNotificationUri(resolver, Files.EXTERNAL_CONTENT_URI); in queryChildDocuments()
816 cursor = resolver.query(Files.EXTERNAL_CONTENT_URI, DocumentQuery.PROJECTION, in queryChildDocuments()
[all …]
/packages/services/Car/tests/carservice_unit_test/src/com/android/car/storagemonitoring/
DCarStorageMonitoringTest.java57 import java.nio.file.Files;
234 new String(Files.readAllBytes(temporaryFile.getPath()))); in testWearEstimateRecordJson()
273 new String(Files.readAllBytes(temporaryFile.getPath()))); in testWearHistoryJson()
478 new String(Files.readAllBytes(temporaryFile.getPath()))); in testUidIoStatEntryJson()
692 new String(Files.readAllBytes(temporaryFile.getPath()))); in testUidIoStatsDeltaJson()
707 Files.write(ext4_part1.getPath().resolve("lifetime_write_kbytes"), in testLifetimeWriteInfo()
709 Files.write(f2fs_part1.getPath().resolve("lifetime_write_kbytes"), in testLifetimeWriteInfo()
711 Files.write(ext4_part2.getPath().resolve("lifetime_write_kbytes"), in testLifetimeWriteInfo()
778 new String(Files.readAllBytes(temporaryFile.getPath()))); in testLifetimeWriteInfoJson()
/packages/apps/DocumentsUI/src/com/android/documentsui/base/
DFiles.java24 public final class Files { class
26 private Files() {} // no initialization for utility classes. in Files() method in Files
/packages/apps/Gallery2/src/com/android/gallery3d/data/
DBucketHelper.java7 import android.provider.MediaStore.Files;
8 import android.provider.MediaStore.Files.FileColumns;
186 return Files.getContentUri(EXTERNAL_MEDIA); in getFilesContentUri()
/packages/apps/Settings/src/com/android/settings/deviceinfo/storage/
DStorageAsyncLoader.java36 import android.provider.MediaStore.Files.FileColumns;
103 MediaStore.Files.getContentUri(MediaStore.VOLUME_EXTERNAL), in getStorageResultsForUsers()
109 MediaStore.Files.getContentUri(MediaStore.VOLUME_EXTERNAL), trashQueryArgs); in getStorageResultsForUsers()

1234