class Wikicr::FileTree

Overview

A FileTree is a tree structure representing a file with a name and subfiles. It is used to map the wiki for the "sitemap" feature.

TODO it should be fully replaced by the index

Defined in:

lib/file_tree.cr

Constructors

Instance Method Summary

Constructor Detail

def self.build(to_scan : String, max_depth : Int = 32) : FileTree #

Build a FileTree that represents the real structure of the "to_scan" It is recursive and may be very time consuming, so there is a limit of depth

FileTree.build("./data/")

[View source]
def self.new(name : String, files : Array(Wikicr::FileTree) = [] of FileTree) #

[View source]

Instance Method Detail

def directory? : Bool #

If the file contains other files, then it is a "directory"


[View source]
def files : Array(FileTree) #

[View source]
def name : String #

[View source]