Determining type of drive a file is on

kee nethery kee at kagi.com
Tue Aug 3 12:51:23 EDT 2004


On Aug 2, 2004, at 4:32 PM, Trevor DeVore wrote:

> On Aug 2, 2004, at 4:26 PM, kee nethery wrote:
>
>> How about:
>> Get a list of all the attached volumes, names and sizes
>> See if the USB drive that you initialized is visible and see if it is 
>> the same size as what you configured it to be.
>> Then see that you are running from that volume.
>> Not fool proof but it's a start.
>> If you have a way to read a specific block on the drive, you could 
>> use that data to provide yet another check. Put a tiny 1K file on the 
>> drive, add your file to the drive. Delete the 1K file. It will look 
>> like there is just your drive but if they duplicate the whole thing 
>> to another USB key, that 1K blank space won't be there.
>
> That sounds like a great idea.  Any suggestions on how to read a 
> specific block on a drive?  Does Rev have a built in way to do this or 
> would it require an external?

No idea how to do it but I don't think it is a USB thing, I think it 
would be an access the disk drive thing and your code would probably 
need to be aware of which OS it was running. Might be custom code to 
extend Rev per platform using standard OS calls, might be some access 
using a shell script. No idea.
Kee



More information about the use-livecode mailing list