// // FileCompletion.m // RCocoaBundle // // Created by Simon Urbanek on Sun Mar 07 2004. // Copyright (c) 2004 __MyCompanyName__. All rights reserved. // #import "FileCompletion.h" @implementation FileCompletion + (NSString*) complete: (NSString*) part { int tl = [part length]; int ls = tl-1, fb; NSString *dir; BOOL working=NO; NSString *fn; //NSLog(@"attepted file-completion: \"%@\"", part); while (ls>0 && [part characterAtIndex:ls]!='/') ls--; if (ls<1 && (tl==0 || [part characterAtIndex:ls]!='/')) working=YES; dir=working?@".":((ls==0)?@"/":[part substringToIndex:ls]); fb=ls; if (fb