mirror of
https://github.com/gui-cs/Terminal.Gui.git
synced 2025-12-29 17:28:01 +01:00
Changed example to show folders first then files (and ensure alphabetical order)
This commit is contained in:
@@ -88,7 +88,10 @@ namespace UICatalog.Scenarios {
|
||||
// If it is a directory it's children are all contained files and dirs
|
||||
if(model is DirectoryInfo d) {
|
||||
try {
|
||||
return d.GetFileSystemInfos();
|
||||
return d.GetFileSystemInfos()
|
||||
//show directories first
|
||||
.OrderBy(a=>a is DirectoryInfo ? 0:1)
|
||||
.ThenBy(b=>b.Name);
|
||||
}
|
||||
catch(SystemException ex) {
|
||||
return new []{ex};
|
||||
|
||||
Reference in New Issue
Block a user