| Server IP : 77.68.64.21 / Your IP : 216.73.216.102 Web Server : Apache System : Linux hp3-wp-1011378.hostingp3.local 3.10.0-1160.144.1.el7.tuxcare.els9.x86_64 #1 SMP Fri Jul 10 17:06:31 UTC 2026 x86_64 User : csh2668128 ( 2112425) PHP Version : 8.1.34 Disable Function : shell_exec,exec,system,popen,set_time_limit MySQL : OFF | cURL : ON | WGET : ON | Perl : ON | Python : ON | Sudo : ON | Pkexec : ON Directory : /usr/share/ruby/vendor_ruby/puppet/file_system/ |
Upload File : |
class Puppet::FileSystem::MemoryImpl
def initialize(*files)
@files = files + all_children_of(files)
end
def exist?(path)
path.exist?
end
def directory?(path)
path.directory?
end
def file?(path)
path.file?
end
def executable?(path)
path.executable?
end
def children(path)
path.children
end
def each_line(path, &block)
path.each_line(&block)
end
def pathname(path)
find(path) || Puppet::FileSystem::MemoryFile.a_missing_file(path)
end
def basename(path)
path.duplicate_as(File.basename(path_string(path)))
end
def path_string(object)
object.path
end
def read(path)
handle = assert_path(path).handle
handle.read
end
def open(path, *args, &block)
handle = assert_path(path).handle
if block_given?
yield handle
else
return handle
end
end
def assert_path(path)
if path.is_a?(Puppet::FileSystem::MemoryFile)
path
else
find(path) or raise ArgumentError, "Unable to find registered object for #{path.inspect}"
end
end
private
def find(path)
@files.find { |file| file.path == path }
end
def all_children_of(files)
children = files.collect(&:children).flatten
if children.empty?
[]
else
children + all_children_of(children)
end
end
end