()
| 259 | |
| 260 | /// Returns the list of child files of this directory. |
| 261 | public String[] list() { |
| 262 | try { |
| 263 | String[] result = FileSystemStorage.getInstance().listFiles(path); |
| 264 | for (int iter = 0; iter < result.length; iter++) { |
| 265 | int len = result[iter].length(); |
| 266 | if (result[iter].endsWith("/")) { |
| 267 | result[iter] = result[iter].substring(0, len - 1); |
| 268 | } |
| 269 | if (result[iter].indexOf("/") != -1) { |
| 270 | result[iter] = result[iter].substring(result[iter].lastIndexOf("/") + 1, len); |
| 271 | } |
| 272 | } |
| 273 | return result; |
| 274 | } catch (IOException err) { |
| 275 | return null; |
| 276 | } |
| 277 | } |
| 278 | |
| 279 | /// Returns list of child files of this directory |
| 280 | /// |
no test coverage detected