开发者

Reading a File on OS X via Java - Is my path correct?

开发者 https://www.devze.com 2023-01-06 16:45 出处:网络
I am trying to do this File file = new File(\"/Users/Jon/Downloads/mynewalbum/artist - title.mp3\"); I don\'t开发者_运维问答 think its correct though as the properties returned don\'t seem correct.

I am trying to do this

File file = new File("/Users/Jon/Downloads/mynewalbum/artist - title.mp3");

I don't开发者_运维问答 think its correct though as the properties returned don't seem correct. Maybe I have got a backslash or something wrong?


Try File.exists() to see whether the file exists. If the path is wrong, the file will not exist.

0

精彩评论

暂无评论...
验证码 换一张
取 消