Sha256: d0b0dc774e7496e8a266cd2fe885e56c7b620c8bc5321daeb40c3cefbd93836a
Contents?: true
Size: 690 Bytes
Versions: 6
Compression:
Stored size: 690 Bytes
Contents
module HaveAPI::Fs::Components class ProxyDir < Directory def initialize(path) super() @path = path end def setup super @dir = ::Dir.new(@path) end def contents @dir.entries[2..-1] end def times st = ::File.stat(@path) [st.atime, st.mtime, st.ctime] end protected def new_child(name) if child = super return child end real_name = name.to_s return unless contents.include?(real_name) path = ::File.join(@dir.path, real_name) if ::File.directory?(path) [ProxyDir, path] else [ProxyFile, path] end end end end
Version data entries
6 entries across 6 versions & 1 rubygems