Re: Ejecting An Image Disk
Re: Ejecting An Image Disk
- Subject: Re: Ejecting An Image Disk
- From: Axel Luttgens <email@hidden>
- Date: Sat, 1 Nov 2008 15:35:44 +0100
Le 31 oct. 08 à 18:31, Luther Fuller a écrit :
[...]
The scripts I am working on need to determine if a disk image file
is encrypted so it can inform the user that it doesn't handle (burn,
convert, &c.) encrypted files. Ever. No passwords needed. Doing that
ought to be simple ... but it's not.
Perhaps hdiutil's imageinfo verb should have a '-encrypted' option
that ALWAYS returns ONLY the encryption status. This would solve my
problem.
Yes, this seems to be a sensible feature request. [1]
In the meantime, and very empirically, perhaps could you try something
along these lines.
For a disk image:
choose file
read result for 4
considering case
set isEncrypted to result is "encr"
end considering
and for a sparse bundle:
choose file
((result as text) & "token") as alias
read result for 4
considering case
set isEncrypted to result is "encr"
end considering
Sorry, I couldn't find a better way up to now.
Nor do I know whether other cases might be encountered.
HTH,
Axel
[1] You know, bugreport.apple.com... ;-)
_______________________________________________
Do not post admin requests to the list. They will be ignored.
AppleScript-Users mailing list (email@hidden)
Help/Unsubscribe/Update your Subscription:
Archives: http://lists.apple.com/archives/applescript-users
This email sent to email@hidden