module Filemod

Overview

Module for interacting with files and directories

Extended Modules

Defined in:

filemod.cr

Instance Method Summary

Instance Method Detail

def file_getextension(filepath : Path) : String | Nil #

Extracts the file extension


[View source]
def file_linecount(filepath : Path) : Int32 | Nil #

Reads file and returns number of lines


[View source]
def read_dir(d : Path) : Array(Path) | Nil #

Reads directory returning paths of all files inside directory


[View source]
def read_dir_rec(d : Path) : Array(Path) | Nil #

Reads directory recursively, returning paths of all files inside directory traversing it recursively.


[View source]
def read_dir_rec_with_depth(d : Path, depth : Int) : Array(Path) | Nil #

Reads directory recursively up to a maximum recursion depth.


[View source]