Home
last modified time | relevance | path

Searched refs:oldFile (Results 1 – 3 of 3) sorted by relevance

/cts/hostsidetests/scopedstorage/libs/ScopedStorageTestLib/src/android/scopedstorage/cts/lib/
DTestUtils.java925 public static void assertCanRenameFile(File oldFile, File newFile) { in assertCanRenameFile() argument
926 assertCanRenameFile(oldFile, newFile, /* checkDB */ true); in assertCanRenameFile()
932 public static void assertCanRenameFile(File oldFile, File newFile, boolean checkDatabase) { in assertCanRenameFile() argument
933 assertThat(oldFile.renameTo(newFile)).isTrue(); in assertCanRenameFile()
934 assertThat(oldFile.exists()).isFalse(); in assertCanRenameFile()
937 assertThat(getFileRowIdFromDatabase(oldFile)).isEqualTo(-1); in assertCanRenameFile()
945 public static void assertCantRenameFile(File oldFile, File newFile) { in assertCantRenameFile() argument
946 final int rowId = getFileRowIdFromDatabase(oldFile); in assertCantRenameFile()
947 assertThat(oldFile.renameTo(newFile)).isFalse(); in assertCantRenameFile()
948 assertThat(oldFile.exists()).isTrue(); in assertCantRenameFile()
[all …]
/cts/hostsidetests/appsecurity/test-apps/MediaStorageApp/src/com/android/cts/mediastorageapp/
DMediaStorageTest.java471 public void assertRenameFileAPISupport(File oldFile) throws Exception { in assertRenameFileAPISupport() argument
472 final String oldName = oldFile.getAbsolutePath(); in assertRenameFileAPISupport()
480 assertThat(oldFile.renameTo(newFile)).isTrue(); in assertRenameFileAPISupport()
482 assertThat(newFile.renameTo(oldFile)).isTrue(); in assertRenameFileAPISupport()
/cts/hostsidetests/scopedstorage/device/src/android/scopedstorage/cts/device/
DScopedStorageDeviceTest.java1055 File oldFile = new File(getDcimDir(), oldDisplayName); in testContentResolverUpdate() local
1059 assertThat(oldFile.createNewFile()).isTrue(); in testContentResolverUpdate()
1062 final Uri uri = MediaStore.scanFile(getContentResolver(), oldFile); in testContentResolverUpdate()
1068 assertThat(oldFile.exists()).isFalse(); in testContentResolverUpdate()
1069 assertThat(oldFile.createNewFile()).isTrue(); in testContentResolverUpdate()
1073 oldFile.delete(); in testContentResolverUpdate()