Re: Ejecting An Image Disk
Re: Ejecting An Image Disk
- Subject: Re: Ejecting An Image Disk
- From: Luther Fuller <email@hidden>
- Date: Sat, 1 Nov 2008 16:37:59 -0500
On Nov 1, 2008, at 9:35 AM, Axel Luttgens wrote:
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.
I just checked this. Seems very workable. I would feel better about
using it if it were documented somewhere, but I'm going to write an
'isEncrypted' handler using this and see how well it works. Thanks for
the suggestion.
_______________________________________________
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