Skip to content

Instantly share code, notes, and snippets.

@mikeobrien
Created March 5, 2011 00:35
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save mikeobrien/855973 to your computer and use it in GitHub Desktop.
Save mikeobrien/855973 to your computer and use it in GitHub Desktop.
require "fileutils"
module FileSystem
def FileSystem.EnsurePath(path)
if !Dir.exists?(path) then
FileUtils.mkdir_p(path)
end
end
def FileSystem.DeleteDirectory(path)
if Dir.exists?(path) then
FileUtils.rm_rf path
end
end
def FileSystem.CopyFiles(source, target)
Dir.glob(source) do |name|
FileUtils.cp(name, target)
end
end
end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment