linux alternatives to tree

C++
#replica of tree comand using find and sed
function tree() {
    find ${1:-.} | sed -e "s/[^-][^\/]*\//  |/g" -e "s/|\([^ ]\)/|-\1/"
}
Source

Also in C++: