My NSArray is:
This returns the full path of /User/Name/.../filename.ppt
I can use a NSString to get only the filename using:
Is there a way that I can cleanup the original NSArray to only return the lastPathComponent without the extension?
Am needing to do this to search within the tableview array. Currently, if a file is named "Test.ppt" the search bar will show it if I type in "/User/Name"
I would prefer for it to only search the filename.
Code:
self.files = [bundle pathsForResourcesOfType:@"ppt" inDirectory:@"thepowerpoints"];
This returns the full path of /User/Name/.../filename.ppt
I can use a NSString to get only the filename using:
Code:
NSString *documentsDirectoryPath = [self.files objectAtIndex:thepath.row];
self.filenames = [[documentsDirectoryPath lastPathComponent] stringByDeletingPathExtension];
Is there a way that I can cleanup the original NSArray to only return the lastPathComponent without the extension?
Am needing to do this to search within the tableview array. Currently, if a file is named "Test.ppt" the search bar will show it if I type in "/User/Name"
I would prefer for it to only search the filename.