Sha256: 04ed8540d9343d27ab10ded8d44c788854cb7a626cb312aec1144811f2617cff
Contents?: true
Size: 533 Bytes
Versions: 43
Compression:
Stored size: 533 Bytes
Contents
require'fileutils' module Perus::Pinger class RemovePath < Command description 'Deletes a file or folder. If "path" is a folder, all files and folders within the folder are deleted as well. Valid values for "path" are contained in the pinger config file.' option :path, restricted: true def run FileUtils.rm_rf([File.expand_path(options.path)], secure: true) true # with no exceptions, the removal was successful end end end
Version data entries
43 entries across 43 versions & 1 rubygems
Version | Path |
---|---|
perus-0.1.2 | lib/perus/pinger/commands/remove_path.rb |
perus-0.1.1 | lib/perus/pinger/commands/remove_path.rb |
perus-0.1.0 | lib/perus/pinger/commands/remove_path.rb |