MCPcopy Create free account
hub / github.com/codenameone/CodenameOne / list

Method list

CodenameOne/src/com/codename1/io/File.java:261–277  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

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 ///

Callers 5

listFilesMethod · 0.95
startMethod · 0.95
executeMethod · 0.95
AddThemeEntryMethod · 0.45
syncDirectoriesMethod · 0.45

Calls 11

getInstanceMethod · 0.95
addMethod · 0.95
sizeMethod · 0.95
toArrayMethod · 0.95
lengthMethod · 0.65
endsWithMethod · 0.65
substringMethod · 0.65
indexOfMethod · 0.65
lastIndexOfMethod · 0.65
acceptMethod · 0.65
listFilesMethod · 0.45

Tested by

no test coverage detected