View Issue Details

IDProjectCategoryView StatusLast Update
0019092MediaMonkey 5Extensions frameworkpublic2022-06-20 10:39
Reporterzvezdan Assigned To 
Status resolvedResolutionreopened 
Fixed in Version5.0.4 
Summary0019092: app.filesystem.getFolderFromString('C:').hasSubfolders is false, but that drive has subfolders
DescriptionHow is it supposed to determine if some folder has subfolders? It was quite simple with the Windows FileSystemObject:
Set oFileObj = CreateObject("Scripting.FileSystemObject")
TagsNo tags attached.
Fixed in build2650



2022-05-27 17:07

developer   ~0068302

In added new method updateHasSubfoldersAsync that updates hasSubfolders value based on current file system state .

i.e can be used like this:
var fld = app.filesystem.getFolderFromString('C:');
var hasSubfolders = await fld.updateHasSubfoldersAsync();
// hasSubfolders == fld.hasSubfolders here


2022-05-27 17:15

updater   ~0068304

Thanks. Maybe I was too fast when asking for this. Shouldn't (fld.getFolderList().whenLoaded().count != 0) be used instead?


2022-06-20 10:39

developer   ~0068606

Sure, it can be, but updateHasSubfoldersAsync() is faster than getFolderList().whenLoaded().count != 0