get_folder_contents.rb revision a2b3d5bb602a9a0d970b6640948f1d7d75ce78bf
# depends on GitRepository, GetCommit, GetObject
if !rugged_commit && url.empty?
[]
else
end
end
contents = []
contents << folder_contents_entry(contents, url, :dir, subdir[:name])
end
tree.each_blob do |file|
contents << folder_contents_entry(contents, url, :file, file[:name])
end
end
contents
end
def folder_contents_entry(contents, url, type, name)
path_file = url.dup
path_file << '/' unless url.empty?
path_file << name
{
type: type,
name: name,
path: path_file
}
end
end