Accessing files with spaces in filename from Java

前端 未结 6 833
小鲜肉
小鲜肉 2020-11-27 23:29

I want to access files in a directory which have spaces in filename from a java program but it doesnot access file.

Scenario is i have names of file in a file . irea

6条回答
  •  再見小時候
    2020-11-28 00:04

    Well I've never had problems with spaces in filenames while reading through Java. Just make sure you escape the path separator properly. I hope the filenames, if you're about to print out using Java, resolve to existing files with proper access permissions.

提交回复
热议问题