1

I have a downloading functionality module which can pause / resume current download.

Let's say, i pause the functionality, change the cache location where all downloads are supposed to be stored, transfer all contents to new location and resume download. Now, if i want to transfer such an incomplete file, the file.list() does not list such a file. But when i create a file object to such a file using absolute path. The object is initialized.

How can i transfer such an file?

Neji
  • 6,591
  • 5
  • 43
  • 66
  • [`Files.list()` returns a `String[]` of filenames relative to the original `File`](https://docs.oracle.com/javase/8/docs/api/java/io/File.html#list--). Unclear what you're asking, or indeed what on earth your title has to do with your question. – user207421 Jun 20 '16 at 10:48
  • I have paused a download. The file is incompletely written on the particular location. If is use files.list() such a file is missing from the list – Neji Jun 20 '16 at 11:33
  • So the problem has to do with a specific download and the *absence* of 'such a file', whatever that means, not with `Files.list()` 'returning names of complete files', which it doesn't. You haven't clarified anything I asked about. Unclear what you're asking. – user207421 Jun 20 '16 at 12:12

1 Answers1

3

Are you OR are you not specifying an extension to your file?
If not, then try giving an extension to your part file and then you should be able to retrieve it in your files list.

Zeba
  • 3,041
  • 1
  • 28
  • 39