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

NSFileManager fileAttributesAtPath confusion


  • Subject: NSFileManager fileAttributesAtPath confusion
  • From: Chris Long <email@hidden>
  • Date: Thu, 6 Mar 2003 10:27:47 -0700

Hey Everyone,

Ive got a small problem here where I am trying to get the size of file at a path. The problem is when I change the path to a pointer(?).

NSDictionary *attributes = [[NSFileManager defaultManager] fileAttributesAtPath:@"/tmp/somefile" traverseLink:NO];

This works perfectly fine for me however the path to the file is not static so I am trying this with no luck.

NSString *path = [NSString stingWithContentsOfFile:@"/tmp/filewithpathinfo"];
NSDictionary *attributes = [[NSFileManager defaultManager] fileAttributesAtPath:path traverseLink:NO];
NSLog(@"%@", path);

I was just using hte NSLog to check if the path was right and it reports the right path to the file like /Volumes/backup/somefile

Any thoughts?

Chris Long
_______________________________________________
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: NSFileManager fileAttributesAtPath confusion
      • From: Stéphane Sudre <email@hidden>
  • Prev by Date: Using X11 BDF/PCF fonts in Cocoa?
  • Next by Date: Re: Code Completion
  • Previous by thread: Using X11 BDF/PCF fonts in Cocoa?
  • Next by thread: Re: NSFileManager fileAttributesAtPath confusion
  • Index(es):
    • Date
    • Thread