Java获取资料列表怪状

Java获取文件列表怪状File file new File(path)if (file.isDirectory() && file.exists()) {String[] f

Java获取文件列表怪状

File file = new File(path);if (file.isDirectory() && file.exists()) {String[] files = file.list();for (String string : files) {updateObject = new UpdateObject();updateObject.setName(string);System.out.println(file.getPath() + "/" + string);


结果是这样的:
D:\F\work\java\Workspaces\Happy\xhsd_hprose\WebRoot\WEB-INF\classes\pda/xhsd - Copy (2).exeD:\F\work\java\Workspaces\Happy\xhsd_hprose\WebRoot\WEB-INF\classes\pda/xhsd - Copy (3).exeD:\F\work\java\Workspaces\Happy\xhsd_hprose\WebRoot\WEB-INF\classes\pda/xhsd - Copy.exeD:\F\work\java\Workspaces\Happy\xhsd_hprose\WebRoot\WEB-INF\classes\pda/xhsd.exe


再次测试:
OK啦