View Issue Details
ID | Project | Category | View Status | Date Submitted | Last Update |
---|---|---|---|---|---|
0019092 | MMW 5 | Extensions framework | public | 2022-05-21 07:10 | 2022-09-30 19:18 |
Reporter | zvezdan | Assigned To | |||
Priority | high | Severity | minor | Reproducibility | N/A |
Status | closed | Resolution | reopened | ||
Fixed in Version | 5.0.4 | ||||
Summary | 0019092: app.filesystem.getFolderFromString('C:').hasSubfolders is false, but that drive has subfolders | ||||
Description | How is it supposed to determine if some folder has subfolders? It was quite simple with the Windows FileSystemObject: Set oFileObj = CreateObject("Scripting.FileSystemObject") oFileObj.GetFolder(sFolder).SubFolders.Count | ||||
Tags | No tags attached. | ||||
Fixed in build | 2650 | ||||
|
In 5.0.4.2650 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 |
|
Thanks. Maybe I was too fast when asking for this. Shouldn't (fld.getFolderList().whenLoaded().count != 0) be used instead? |
|
Sure, it can be, but updateHasSubfoldersAsync() is faster than getFolderList().whenLoaded().count != 0 |
|
Verified 2667 Tested using example from 0019092:0068302 |