Re: How determine if file is in Trash, given Path or Alias
Re: How determine if file is in Trash, given Path or Alias
- Subject: Re: How determine if file is in Trash, given Path or Alias
- From: Martin Wierschin <email@hidden>
- Date: Mon, 1 Jun 2009 15:03:34 -0700
const UInt8* utfPath = (UInt8*)[path UTF8String];
OSStatus err = DetermineIfPathIsEnclosedByFolder
(kOnAppropriateDisk, kTrashFolderType, utfPath, false, &inTrash);
For the archives: 2 more problems:
a) use fileSystemRepresentation not UTF8String.
I initially considered that, but the documentation for
DetermineIfPathIsEnclosedByFolder specifically says it requires UTF-8
encoded characters, while fileSystemRepresentation mentions no
guarantee as to the encoding. I'm sure that that the file system
representation is currently UTF-8, and will stay that way, but I
don't want to make that assumption.
I don't often work with the C-based APIs, so maybe I'm way off base
here. Should I file a documentation bug? And if so, which piece of
documentation needs adjusting?
~Martin
_______________________________________________
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