• Open Menu Close Menu
  • Apple
  • Shopping Bag
  • Apple
  • Mac
  • iPad
  • iPhone
  • Watch
  • TV
  • Music
  • Support
  • Search apple.com
  • Shopping Bag

Lists

Open Menu Close Menu
  • Terms and Conditions
  • Lists hosted on this site
  • Email the Postmaster
  • Tips for posting to public mailing lists
Re: NSTask and 10.9
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: NSTask and 10.9


  • Subject: Re: NSTask and 10.9
  • From: Pax <email@hidden>
  • Date: Tue, 26 Nov 2013 17:15:28 +0000

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@hidden> wrote:

>
> On Nov 26, 2013, at 8:56 AM, Pax <email@hidden> wrote:
>
>> hy would you delete files in this manner?
>
> Need to wildcard the file names.

_______________________________________________

Cocoa-dev mailing list (email@hidden)

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:

This email sent to email@hidden


References: 
 >NSTask and 10.9 (From: koko <email@hidden>)
 >Re: NSTask and 10.9 (From: Pax <email@hidden>)
 >Re: NSTask and 10.9 (From: koko <email@hidden>)

  • Prev by Date: Re: iOS screen physical size (or px density)
  • Next by Date: Re: NSTask and 10.9
  • Previous by thread: Re: NSTask and 10.9
  • Next by thread: Re: NSTask and 10.9
  • Index(es):
    • Date
    • Thread