class ThunderstorePackageDownloader::PathBuilder
- ThunderstorePackageDownloader::PathBuilder
- Reference
- Object
Defined in:
thunderstore_downloader/path_builder.crConstructors
Instance Method Summary
Constructor Detail
Instance Method Detail
def 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"