Xojo’s handling of virtual volumes is causing us headaches.
If a vv is opened and only read (no writing, confirmed), when it’s closed the modification date gets touched (updated to today’s date/time). Only tested on the Mac so far. Tested from Xojo 2014 up to 2016.4.1
Digging though Google and list archives I see an old post from Joe Strout that says:
[quote] When you open a virtual
volume, even if you don’t explicitly write to it, there are block
caches and so on that may write to the file[/quote]
Is this still true? If so is there any way around it? (other than painful and slow copying to a temp location and opening, etc)
Opening a file in a read-only manner should NOT alter the modification timestamp!
I would steer clear of Virtual Volumes, personally, but I have used them in the past. They have their use though with read-only situations and in that case I did write to a temporary location and tried to clean up when the app quit.
Is the format for virtual volumes available? Is the code? We’d like to use it for some functions but would also like to be able to enhance it when possible…
[quote=311550:@Steve Upton]Is the code?
[/quote]
No
I’d craft a custom format of your own that satisfies your needs
Heck you could almost mimic a FAT format which has a fixed size “toc” entry with names & pointers to the fist block and pointers from the end of each block to the next
They’re pretty straight forward and you can then do whatever you wanted with the format
In fact here’s a good reason for creating your own file format.
I produce among other things (especially obnoxious noises) Photography software. In general people want two things; they want their photos to be compatible with other applications and they want to be able to undo the changes they made to their photos.
I actually created a modified TIFF file that would allow this, it adhered to the TIFF specification, and the way in which I created the data meant that the whole file didn’t have to be recreated every time the user saved. In one experiment, I even injected JPEG data instead of TIFF pixel data. so I was really quite proud of myself I can tell you that.
Until we opened and saved in any image editor that supported TIFF. BOOM! Everything I’d done was lost, so while I based it on the TIFF spec, I’d didn’t realize that other programs would simply ignore what they don’t think they need and then not write it back into the file.
Experiment over, so the users are stuck with two files, one editable (changes can be undone) and one that’s compatible with other applications.