Module util
Utilities
Functions
| P.set_error (err) | Set error message. |
| P.clr_error () | Reset error message (no errors). |
| P.has_error () | Check for an error. |
| P.get_error () | Get error message. |
| P.copy_file (from, to) | Copy file. |
| P.pairsByKeys (t, f) | Iterator for sorted table keys. |
| P.last_commit ([path=false[, fname=false]]) | Get hash and date of last the last Git commit fo a file. |
| P.base64_decode (data) | Base64 decode data. |
| P.base64_encode (data) | Base64 encode data. |
Fields
| P.path_separator | The systems path separator. |
| P._error | Internatl (!) variable to hold an error. |
Functions
- P.set_error (err)
-
Set error message.
Parameters:
- err
- P.clr_error ()
- Reset error message (no errors).
- P.has_error ()
- Check for an error.
- P.get_error ()
- Get error message.
- P.copy_file (from, to)
-
Copy file.
Parameters:
- from
- to
- P.pairsByKeys (t, f)
-
Iterator for sorted table keys.
Using pairs() in a for-loop traverses the tables items in some random order. This is an issue if you want for example to print the content of a dictonary and expect this to result for the same data in the same output on multiple calls of the script.
Parameters:
- t
- f
See also:
- P.last_commit ([path=false[, fname=false]])
-
Get hash and date of last the last Git commit fo a file.
Returns the full commit hash and the date in YYYY-MM-DD format.
Parameters:
Returns:
-
hash, date
- P.base64_decode (data)
-
Base64 decode data.
Parameters:
- data A base64 encoded srring.
- P.base64_encode (data)
-
Base64 encode data.
Parameters:
- data Some binary data.