luadocs/content/lua.scripts.api.manual/dtutils.file/test_file.md
2021-04-09 00:31:16 -04:00

570 B

title id weight draft author
test_file test_file 200 false people

NAME

test_file

SYNOPSIS

test a file to see what it is

USAGE

local df = require "lib/dtutils.file"
local result = df.test_file(path, test)

path - string - path and filename test - char - one of d, e, f, x where

  • d - directory
  • e - exists
  • f - file
  • x - executable

DESCRIPTION

test_file checks a specified path to see if it meets the specified test

RETURN VALUE

result - boolean - true if the path satisfies the test, false if not