Link Search Menu Expand Document

Advanced LS

Lists the aboslute path of all files in the given path.

import os

var path = os.args.length() > 2 ? os.args[2] : '.'
var files = os.read_dir(path)
var dir = os.real_path(path)

for f in files {
  if f echo '${dir}${os.path_separator}${f}'

Back to top

Copyright © 2021 Ore Richard Muyiwa. Distributed under the MIT license.