• 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 to search for mop3 files, retrieve those file and play these file into apps
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: How to search for mop3 files, retrieve those file and play these file into apps


  • Subject: Re: How to search for mop3 files, retrieve those file and play these file into apps
  • From: rajesh <email@hidden>
  • Date: Thu, 5 Mar 2009 11:01:15 +0100

Scanning system directory for files with NSFileManager traversing each node ? I think it is not an efficient ... not to mention so many nodes in an hierarchy you need to scan

A simple google search will help you in this regard, for starters there are file handlers and spotlight guides could be your friends

Good luck

Rajesh

On Mar 5, 2009, at 10:49 AM, Graham Cox wrote:


On 05/03/2009, at 8:41 PM, haresh vavdiya wrote:

          I  am developing one application in which user can retrieve
music file from machine and use can play this music file also.

So i have to search for ".mp3" files in all folders and then
display into table. Can anyone tell me that how can i search, retrieve .mp3
file and play this particular file into my apps.


Briefly, scan the disk using NSFileManager. You can use - enumeratorAtPath: to get an NSDirectoryEnumerator that will perform the scan. Gather the results into some sort of data storage that suits the purpose - a simple array would probably do, such as NSMutableArray.

To display the results in a table, NSTableView hooked to a controller e.g. NSArrayController that uses the above array as its data model.

To play an mp3 file, the simplest way is to use Quicktime via QTKit. e.g. [QTMovie movieWithURL:error:] followed by [myMovie play];

--Graham






_______________________________________________

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

_______________________________________________

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


References: 
 >How to search for mop3 files, retrieve those file and play these file into apps (From: haresh vavdiya <email@hidden>)
 >Re: How to search for mop3 files, retrieve those file and play these file into apps (From: Graham Cox <email@hidden>)

  • Prev by Date: Re: How to search for mop3 files, retrieve those file and play these file into apps
  • Next by Date: Odd crash-loading AppleScripts
  • Previous by thread: Re: How to search for mop3 files, retrieve those file and play these file into apps
  • Next by thread: Re: How to search for mop3 files, retrieve those file and play these file into apps
  • Index(es):
    • Date
    • Thread