title: File.delete() function works only first time then throws f noilet found for other images
body: <p>I am storing uri for all files in a list which are in
  Directory</p>
  <pre><code>&quot;/storage/emulated/0/Android/data/com.pratiksahu.dokify/&quot;
  </code></pre>
  <p>This is the function which is used to delete files</p>
  <pre><code>fun setupDeleteImageButtonListener() {
          deleteFileButton.setOnClickListener {
              if(selectedItemsImage.size&gt;0)
              selectedItemsImage.forEach {
                  File(&quot;/storage/emulated/0/Android/data/com.pratiksahu.dokify/&quot;, it.path).delete()
                      .let { result -&gt;
                          Log.d(TAG_DELETE, it.path + &quot; &lt;-- $result&quot;)
                      }
              }
              selectedItemsImage.clear() //using this to store image uri
              selectedItems.clear() //using this to store index which is being used in recyclerview with checkbox
              importedImagesAdapter?.setSelectedItems(selectedItems) //updating checkbox selected items
              imageList.clear() //Clearing list which is retrieved from scanning the directory when app starts
              imagePagerViewModel.initImages() // Refreshing available files list (Contains uri)
              importedImagesAdapter?.items = imageList //Setting new list to adapter
          }
      }
  </code></pre>
  <p>I am able to delete files in first batch , but if I try to delete files in second batch , File.delete() is not able to find the file though it is present in directory</p>
  <p><a href="https://i.stack.imgur.com/FyiT7.jpg" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/FyiT7.jpg" alt="enter image description here" /></a></p>