
the updated functionality. Added dtutils.file/test_file to document new function for file testing. [scripts manual] Updated script_manager to document rewrite of script.
35 lines
569 B
Markdown
35 lines
569 B
Markdown
---
|
|
title: test_file
|
|
id: test_file
|
|
weight: 200
|
|
draft: false
|
|
author: "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
|