• 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: How can I check to see if a mounted volume is an iPod or not?
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: How can I check to see if a mounted volume is an iPod or not?


  • Subject: Re: How can I check to see if a mounted volume is an iPod or not?
  • From: Conor <email@hidden>
  • Date: Sun, 02 Dec 2007 12:02:31 +0100

> How can I check to see if a mounted volume (in /Volumes directory)
> is an iPod or not?

The following iPod_Control file is on all iPods:


    NSEnumerator *iPodFilesEnum = [[[NSWorkspace sharedWorkspace]
mountedRemovableMedia] objectEnumerator];
    while (ipodMountedPath = [iPodFilesEnum nextObject]) {

        if ([manager fileExistsAtPath:[ipodMountedPath
stringByAppendingPathComponent:@"iPod_Control"]]) {
            NSLog(@"Is iPod at: %@", ipodMountedPath);
            break;
        }
    }

Regards,
Conor
http://www.bruji.com/


_______________________________________________

Cocoa-dev mailing list (email@hidden)

Please do not post admin requests or moderator comments to the list.
Contact the moderators at cocoa-dev-admins(at)lists.apple.com

Help/Unsubscribe/Update your Subscription:

This email sent to email@hidden

  • Prev by Date: drag&drop filename
  • Next by Date: Re: Creating subviews programmatically ?
  • Previous by thread: Re: How can I check to see if a mounted volume is an iPod or not?
  • Next by thread: NSImage lock/unlock slow
  • Index(es):
    • Date
    • Thread