module Filemod
Overview
Module for interacting with files and directories
Extended Modules
Defined in:
filemod.crInstance Method Summary
-
#file_getextension(filepath : Path) : String | Nil
Extracts the file extension
-
#file_linecount(filepath : Path) : Int32 | Nil
Reads file and returns number of lines
-
#read_dir(d : Path) : Array(Path) | Nil
Reads directory returning paths of all files inside directory
-
#read_dir_rec(d : Path) : Array(Path) | Nil
Reads directory recursively, returning paths of all files inside directory traversing it recursively.
-
#read_dir_rec_with_depth(d : Path, depth : Int) : Array(Path) | Nil
Reads directory recursively up to a maximum recursion depth.
Instance Method Detail
def read_dir(d : Path) : Array(Path) | Nil
#
Reads directory returning paths of all files inside directory
def read_dir_rec(d : Path) : Array(Path) | Nil
#
Reads directory recursively, returning paths of all files inside directory traversing it recursively.
def read_dir_rec_with_depth(d : Path, depth : Int) : Array(Path) | Nil
#
Reads directory recursively up to a maximum recursion depth.