Class: Dir
Class Method Summary collapse
Class Method Details
.[](glob) ⇒ Object
8 9 10 |
# File 'opal/stdlib/nodejs/dir.rb', line 8 def [] glob `__glob__.sync(#{glob})` end |
.entries(dirname) ⇒ Object
20 21 22 23 24 25 26 27 28 29 |
# File 'opal/stdlib/nodejs/dir.rb', line 20 def entries(dirname) %x{ var result = []; var entries = __fs__.readdirSync(#{dirname}); for (var i = 0, ii = entries.length; i < ii; i++) { result.push(entries[i]); } return result; } end |
.mkdir(path) ⇒ Object
16 17 18 |
# File 'opal/stdlib/nodejs/dir.rb', line 16 def mkdir(path) `__fs__.mkdirSync(#{path})` end |
.pwd ⇒ Object Also known as: getwd
12 13 14 |
# File 'opal/stdlib/nodejs/dir.rb', line 12 def pwd `process.cwd()` end |