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
196 197 198
# File 'opal/stdlib/nodejs/file.rb', line 196 def initialize(path) @path = path end
Instance Method Details
#file? ⇒ Boolean
Returns:
- (Boolean )
200 201 202
# File 'opal/stdlib/nodejs/file.rb', line 200 def file? `return executeIOAction(function(){return __fs__.statSync(#{@path}).isFile()})` end
#mtime ⇒ Object
204 205 206
# File 'opal/stdlib/nodejs/file.rb', line 204 def mtime `return executeIOAction(function(){return __fs__.statSync(#{@path}).mtime})` end