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
346 347 348
# File 'opal/stdlib/nodejs/file.rb', line 346 def initialize(path) @path = path end
Instance Method Details
#file? ⇒ Boolean
Returns:
- (Boolean )
350 351 352
# File 'opal/stdlib/nodejs/file.rb', line 350 def file? `return executeIOAction(function(){return __fs__.statSync(#{@path}).isFile()})` end
#mtime ⇒ Object
354 355 356
# File 'opal/stdlib/nodejs/file.rb', line 354 def mtime `return executeIOAction(function(){return __fs__.statSync(#{@path}).mtime})` end