• 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
NSURL vs NSFileManager
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

NSURL vs NSFileManager


  • Subject: NSURL vs NSFileManager
  • From: Yuhui <email@hidden>
  • Date: Tue, 15 Apr 2003 22:11:07 -0500

Hi,

It seems that I've encountered an interesting problem. My program lists the sound files in /System/Library/Sounds and ~/Library/Sounds. It seems that if I get the file names via NSFileManager, then I don't have to worry about localized folder names. But if I use NSURL to get the file names (to play via Quicktime, for example), then it'll choke on the localized folder names.

I don't think my assumption above is wrong, because previously, I used NSSound's initWithContentsOfFile:byReference: to play the AIFF files in those folders, and everything worked fine, but when I switched to using NSMovieView (using NSMovie's initWithURL:byReference:), problems started appearing.

So does NSURL choke on localized folder names? If so, is there a workaround? I thought of using FSFindFolder, but it seems to list only the "top level" folders, e.g. /System/Library or ~/Library, but not the Sounds (or any of the lower level) folders, which might have localized names. Or is there a way to convert NSFileManager's paths into localized NSURLs? I used NSURL's fileURLWithPath: method, but it still seems to choke.

Thanks.
Yuhui
_______________________________________________
cocoa-dev mailing list | email@hidden
Help/Unsubscribe/Archives: http://www.lists.apple.com/mailman/listinfo/cocoa-dev
Do not post admin requests to the list. They will be ignored.

  • Follow-Ups:
    • Re: NSURL vs NSFileManager
      • From: Dustin Voss <email@hidden>
  • Prev by Date: Re: Inconsistent Memory Management Rules
  • Next by Date: RE: POST & GET Examples don't work behind a firewall?
  • Previous by thread: RE: POST & GET Examples don't work behind a firewall?
  • Next by thread: Re: NSURL vs NSFileManager
  • Index(es):
    • Date
    • Thread