Class: File::Stat
Instance Method Summary collapse
- #file? ⇒ Boolean
-
#initialize(path) ⇒ Stat
constructor
A new instance of Stat.
- #mtime ⇒ Object
Constructor Details
#initialize(path) ⇒ Stat
Returns a new instance of Stat.
321 322 323 |
# File 'opal/stdlib/nodejs/file.rb', line 321 def initialize(path) @path = path end |
Instance Method Details
#file? ⇒ Boolean
325 326 327 |
# File 'opal/stdlib/nodejs/file.rb', line 325 def file? `return executeIOAction(function(){return __fs__.statSync(#{@path}).isFile()})` end |
#mtime ⇒ Object
329 330 331 |
# File 'opal/stdlib/nodejs/file.rb', line 329 def mtime `return executeIOAction(function(){return __fs__.statSync(#{@path}).mtime})` end |