ThunderstorePackageDownloader::PathBuilder
Inherits Reference < Object
Constructors
new
SourceInstance methods
walk(path = @root, &block : String, Array(String), Array(String) -> )
eg. if file name "config.txt" is nested within the following directory: home >> servers >> server200 >> BepInEx >> plugins, the directory path would be home/servers/server200/BepInEx/plugins this method does not complete the path up to the filenames within the folder so we need to pass in a block to it that would return an array of nested directories, loop thru each directory, and then get the entries of that directory and append the file name to the parent paths (see file_hash.cr line 26)
Example: path_builder = PathBuilder.new path_builder.walk(/home/servers) { |folder| puts folder } => "/home/servers/blah"