BaH.Volumes - Update
BlitzMax Forums/Brucey's Modules/BaH.Volumes - Update
| ||
BaH.Volumes is a small cross-platform module which provides useful volume/device information support for BlitzMax, using a common API. A new version (1.07) is now available. This contains the following improvements : * Added support for all native CSIDL paths on Win32 using GetCustomDir. * Added support for 'k' paths on Mac using GetCustomDir. * Updated documentation. BaH.Volumes is available for download from the Maxmods GoogleCode site, as are most of my modules. Enjoy :o) |
| ||
Cool, thanks |
| ||
Cool. It might be useful |
| ||
Thanks, this will be handy. |
| ||
Hi Brucey, I cannot seem to locate the Recycle Bin with GetCustomDir...Const CSIDL_DESKTOP = $0000 ' <desktop> Const CSIDL_BITBUCKET = $000a ' <desktop>\Recycle Bin CSIDL_DESKTOP works fine but CSIDL_BITBUCKET returns blank on Win32 (I'm on Win7). Any idea? No biggie but I'd like to be able to move files to trash rather than deletefile(). Also, I can't find any info on these 'k paths' you mention. Do you know what the mac equivalent is or where I can find a list of k-paths? |
| ||
Vista deprecates CSIDL, apparently... cool :-) I have a workaround, which uses the new API... just need to see how to implement it and yet remain compatible with the rest (if that's possible!) There's a long list of k-paths in the current source (vol_mac.bmx), that you can use. I think that has most of them. |
| ||
I've checked in new support for FOLDERIDs. On systems that support it (vista, win7, etc) it should transparently use the matching FOLDERID value for the passed CSIDL, calling the new API instead. But funnily enough, I can't get FOLDERID_RecycleBinFolder to return anything, while all the others appear to be working as expected!! :-/ I think it may be because it is a virtual folder, and I may need to go in through IKnownFolderManager::GetFolder to find a real path instead... this may be true for all the virtual folders. |
| ||
After further investigation, virtual folders simply don't exist. That's why it returns nothing. So you don't have direct access to a path for virtual folders :) However, it is possible to delete a file using SHFileOperation, and have it go into the recycle bin rather than being deleted permanently, but this functionality is outside the scope of my module. |
| ||
You need to use the API to throw a deleted file at the recycle bin -- Simply moving a file to the recylcebin folder (if you knew the location) wouldn't be sufficient since it wouldn't know the original location necessary to restore a file if you changed your mind. |
| ||
That too :-) |