• 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
Alias Woes...
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Alias Woes...


  • Subject: Alias Woes...
  • From: Jerry LeVan <email@hidden>
  • Date: Tue, 20 Jul 2004 18:52:37 -0400

It appears that if I have the path to an "alias" that evil
things happen if I try to get at the contents of the file
represented by the alias.

Consider:
[inputTextView setString:
[NSString stringWithContentsOfFile:
@"/Users/jerry/Desktop/TestSummaryReports.sql"]];

If the above is the path to an alias the textview get null,
if it is a path to a "regular" file it works ;(

Similarly if I drag an alias to my editor window I get nothing,
dragging a "regular" file works fine.

It also appears that the test for a directory that the documentation
gives in the doco:

if( ([manager fileExistsAtPath:dirPath isDirectory:&isDir] && isDir))

fails if dirpath is an alias.

Sym links work fine. Is there a solution for aliases?

Note that if I use the "open file" panel I do get the appropriate
contents. Also if I drag an alias onto the app icon I will get
the contents of the file on opening...

Jerry
_______________________________________________
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: Alias Woes...
      • From: Mario Diana <email@hidden>
    • Re: Alias Woes...
      • From: Greg Robbins <email@hidden>
  • Prev by Date: Re: From Carbon to Cocoa
  • Next by Date: Re: Sending image from separate thread back to AppController
  • Previous by thread: RE: Bug in NSImageView?
  • Next by thread: Re: Alias Woes...
  • Index(es):
    • Date
    • Thread