Class: File::Stat

Inherits:
Object show all
Defined in:
opal/stdlib/nodejs/file.rb

Instance Method Summary collapse

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:



350
351
352
# File 'opal/stdlib/nodejs/file.rb', line 350

def file?
  `return executeIOAction(function(){return __fs__.statSync(#{@path}).isFile()})`
end

#mtimeObject



354
355
356
# File 'opal/stdlib/nodejs/file.rb', line 354

def mtime
  `return executeIOAction(function(){return __fs__.statSync(#{@path}).mtime})`
end