Thanks! The missing "stringByAppendingPathComponent" made all the
difference. In fact, I no longer needed to check for [aFile
hasPrefix:@"."] as the rest of the function picks it up. These
changes, along with changing the cStringUsingEncoding: to
NSUTF8StringEncoding, has picked up almost all of the remaining files/
folders. The only two that I see off the bat that are not turning
invisible are /net and /home.
Thanks all,
Justin
On Nov 14, 2007, at 5:25 PM, Chris Campbell wrote:
On Nov 14, 2007, at 7:52 PM, Justin Hawkwood wrote:
Note that contentsOfDirectoryAtPath:error: will return an array of
file/directory names ("MyWordFile.doc", "YayPlainText.txt"), not
full paths ("/Users/chris/Documents/MyWordFile.doc", ...). So later
on, when you loop through it:
int i;
for (i = 0; i < [pathCont count]; i++) {
NSString *aFile = [pathCont objectAtIndex:i];
if ([self isVisible:aFile])
// code
}
You should build a full path by concatenating the file/directory
name to the end of the containing directory's path: