private Java.Io.File[] GetEntries(string path) { var dir = new Java.Io.File(path); if (dir.Exists() && dir.IsDirectory()) { var entries = dir.ListFiles(); if (entries != null) { var list = entries.OrderBy(x => x.Name).ToList(); if (path != startPath) { var parent = dir.ParentFile; if (parent != null) { list.Insert(0, parent); } } return list.ToArray(); } } return new Java.Io.File[0]; }
private Java.Io.File[] GetEntries(string path) { var dir = new Java.Io.File(path); if (dir.Exists() && dir.IsDirectory()) { var entries = dir.ListFiles(); if (entries != null) { var list = entries.OrderBy(x => x.Name).ToList(); if (path != startPath) { var parent = dir.ParentFile; if (parent != null) { list.Insert(0, parent); } } return(list.ToArray()); } } return(new Java.Io.File[0]); }
/// <summary> /// Does a directory with given path exist on the filesystem? /// </summary> public static bool Exists(string path) { var file = new JFile(path); return(file.IsDirectory() && file.Exists()); }
/// <summary> /// Does a directory with given path exist on the filesystem? /// </summary> public static bool Exists(string path) { var file = new JFile(path); return file.IsDirectory() && file.Exists(); }