• Open Menu Close Menu
  • Apple
  • Shopping Bag
  • Apple
  • Mac
  • iPad
  • iPhone
  • Watch
  • TV
  • Music
  • Support
  • Search apple.com
  • Shopping Bag

Lists

Open Menu Close Menu
  • Terms and Conditions
  • Lists hosted on this site
  • Email the Postmaster
  • Tips for posting to public mailing lists
Re: Ejecting An Image Disk
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

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
  • Follow-Ups:
    • Re: Ejecting An Image Disk
      • From: Luther Fuller <email@hidden>
  • Prev by Date: Re: Running a shell script via applescript on a remote station?
  • Next by Date: Print to PDF work flow
  • Previous by thread: Re: Running a shell script via applescript on a remote station?
  • Next by thread: Re: Ejecting An Image Disk
  • Index(es):
    • Date
    • Thread