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.



321
322
323
# File 'opal/stdlib/nodejs/file.rb', line 321

def initialize(path)
  @path = path
end

Instance Method Details

#file?Boolean

Returns:



325
326
327
# File 'opal/stdlib/nodejs/file.rb', line 325

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

#mtimeObject



329
330
331
# File 'opal/stdlib/nodejs/file.rb', line 329

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