View Issue Details
ID | Project | Category | View Status | Date Submitted | Last Update |
---|---|---|---|---|---|
0019090 | MMW 5 | Extensions framework | public | 2022-05-21 06:57 | 2022-09-21 14:31 |
Reporter | zvezdan | Assigned To | |||
Priority | high | Severity | minor | Reproducibility | N/A |
Status | feedback | Resolution | reopened | ||
Target Version | 5.1 | Fixed in Version | 5.0.4 | ||
Summary | 0019090: filesystem.driveIsReady method needed | ||||
Description | Just 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. | ||||
Tags | No tags attached. | ||||
Fixed in build | 2650 | ||||
|
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 |
|
|
|
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. |
|
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 |
|
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). |
|
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". |