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



142
143
144
# File 'opal/stdlib/nodejs/file.rb', line 142

def initialize(path)
  @path = path
end

Instance Method Details

#file?Boolean

Returns:



146
147
148
# File 'opal/stdlib/nodejs/file.rb', line 146

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

#mtimeObject



150
151
152
# File 'opal/stdlib/nodejs/file.rb', line 150

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