View Issue Details

IDProjectCategoryView StatusLast Update
0019090MMW 5Extensions frameworkpublic2022-09-21 14:31
Reporterzvezdan Assigned To 
PriorityhighSeverityminorReproducibilityN/A
Status feedbackResolutionreopened 
Target Version5.1Fixed in Version5.0.4 
Summary0019090: filesystem.driveIsReady method needed
DescriptionJust one information for those who don't have an experience with drives having removable medias like CD/DVD/BluRay or even floppy/Zip drives: the DriveExists (https://docs.microsoft.com/en-us/office/vba/language/reference/user-interface-help/driveexists-method) is not the same as drive IsReady (https://docs.microsoft.com/en-us/office/vba/language/reference/user-interface-help/isready-property).

You could have a drive that exists in the computer, but is not ready for use, e.g. because you didn't insert disc or because it is scratched and drive is trying to read it unsuccessfully.

Which also means that app.filesystem.getDriveList method is not applicable for this use. And it seems that app.filesystem.getInsertedMediaList() method is not working correctly either. Which is not surprising since your own program doesn't work correctly with drives having removable medias, unlike MM4 and Windows Explorer, as I described in another issue (0019089).

One related note, which is mentioned in that issue: every disc could have its own label.

Of course, you didn't mention the getDriveList method in the web API and neither the getInsertedMediaList method.
TagsNo tags attached.
Fixed in build2650

Relationships

related to 0019089 closedLudek Label and tracks for audio CD not updated when the drive is selected under the Folders node (upon inserting) 

Activities

Ludek

2022-05-27 18:45

developer   ~0068307

For me app.filesystem.getInsertedMediaList() method works fine to list only the drives with inserted medias.
This method is used and the list is listened for changes in nodeHandlers.root and is responsible to show the CD node once Audio CD is inserted directly sub to the tree root.

While Folders node uses app.filesystem.getDriveList() and thus lists the CD drives even when there is no disc inserted

Ludek

2022-05-27 18:58

developer   ~0068311

image.png (25,759 bytes)   
image.png (25,759 bytes)   

zvezdan

2022-05-27 19:07

updater   ~0068314

If I remember correctly, getInsertedMediaList() method has the same problem as Folders node mentioned in another issue. I will check it when you publish the update.

Ludek

2022-05-27 20:50

developer   ~0068318

Last edited: 2022-05-27 20:50

Documentation is updated (will be uploaded to server by Jiri later).

Plus added new method isEmpty for SharedDrive object (which returns true when CD isn't inserted).

=> added in 5.0.4.2650

zvezdan

2022-05-27 22:23

updater   ~0068320

Well, technically speaking, if drive 'is not empty' that doesn't necessarily mean that it 'is ready'. For example, if you insert disc that is not readable for whatever reason (being scratched or if you put DVD into CD drive).

zvezdan

2022-06-04 11:06

updater   ~0068432

The mentioned isEmpty method is not what I asked for. It seems that it is just a recycled getInsertedMediaList method, which works only with optical drives (MediaType = 4).

I asked for a replacement for IsReady method of Drive object in Microsoft's FileSystemObject. It is applicable not only on optical drives, but on removable drives as well (MediaType = 2): "For removable-media drives and CD-ROM drives, IsReady returns True only when the appropriate media is inserted and ready for access."

For example, I could have an USB flash drive plugged-in, having its drive letter, which is not formatted and hence it is not "ready for access". But you cannot call it "empty".

And by the way, why getInsertedMediaList doesn't report inserted floppy disks? They are "media" and they could be "inserted".