Skip to content

Instantly share code, notes, and snippets.

@mikeabdullah
Created May 28, 2011 12:12
Show Gist options
  • Save mikeabdullah/996823 to your computer and use it in GitHub Desktop.
Save mikeabdullah/996823 to your computer and use it in GitHub Desktop.
-ks_stringByIncrementingPath example
- (NSString *)firstAvailableFilename:(NSString *)filename
{
while (![self isFilenameAvailable:filename])
{
filename = [filename ks_stringByIncrementingPath];
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment