So:
NSFileManager *fileMgr = [NSFileManager defaultManager];
NSArray *contents = [fileMgr contentsOfDirectoryAtPath:<path>
error:nil];
for (NSString *item in contents)
{
if ([item rangeOfString:<wildcard>].location !=NSNotFound)
{
[fileMgr removeItemAtPath:item error:NULL];
}
}
Please note that I haven't tested this - I've just pulled it out of my, erm,
head. This is just the approach that I'd take. Change <path> and <wildcard>
as appropriate.
On 26 Nov 2013, at 16:42, koko <[email protected]> wrote:
>
> On Nov 26, 2013, at 8:56 AM, Pax <[email protected]> wrote:
>
>> hy would you delete files in this manner?
>
> Need to wildcard the file names.
_______________________________________________
Cocoa-dev mailing list ([email protected])
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:
https://lists.apple.com/mailman/options/cocoa-dev/archive%40mail-archive.com
This email sent to [email protected]