File.prototype.level()

Returns the file’s nesting level.

Syntax

file.level() int

Description

Returns the file’s nesting level by simply looking at the file’s path. The root file is level 0, its children are level 1, and so on.

Examples

Root file is level 0.

Root’s children are level 1.

Sub-volumes do not increase the nesting level.