rake task ) fileutils how to remove parent specific folder

Erwin
Tue, 20 Nov 2012 11:08:21 -0000

I have a fixtures directory structure

fixtures
  en
    alpha
    beta
    delta
  es
    alpha
    beta
    delta

and one rake task to remove all fixtures

        path = File.join(MyApp.config.fixtures_path)
        FileUtils.rm_rf(path)

or all folders w specific locale
        path = File.join(MyApp.config.fixtures_path, locale)
        FileUtils.rm_rf(path)

but is there a way to remove all folders with name ''alpha''  in
ALL locales
folder, and get a resulting structure

fixtures
  en
    beta
    delta
  es
    beta
    delta

thanks for your suggestions

--
You received this message because you are subscribed to the Google Groups
"Ruby on Rails: Talk" group.
To post to this group, send email to
rubyonrails-talk-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org
To unsubscribe from this group, send email to
rubyonrails-talk+unsubscribe-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org
To view this discussion on the web visit