Module: FileUtils
Instance Method Summary collapse
- #cp(source, target) ⇒ Object
- #mkdir_p(path) ⇒ Object (also: #mkpath, #makedirs)
- #mv(source, target) ⇒ Object
- #rm(path) ⇒ Object
Instance Method Details
#cp(source, target) ⇒ Object
#mkdir_p(path) ⇒ Object Also known as: mkpath, makedirs
5 6 7 8
# File 'opal/stdlib/nodejs/fileutils.rb', line 5 def mkdir_p path return true if File .directory? path `__fs__.mkdirSync(#{path})` end
#mv(source, target) ⇒ Object
#rm(path) ⇒ Object
15 16 17
# File 'opal/stdlib/nodejs/fileutils.rb', line 15 def rm path `__fs__.unlinkSync(path)` end