Add Westermo chomp() function, slightly improved from Finit original.

Signed-off-by: Tobias Waldekranz <tobias@waldekranz.com>
Signed-off-by: Joachim Nilsson <troglobit@gmail.com>
This commit is contained in:
Tobias Waldekranz authored and Joachim Nilsson committed 2015-06-17 22:07:10 +02:00
1 parent 745256909e
commit 121e8ee888
4 files changed
+68 -11

No files matched your search

+13 -10
View File
@@ -8,21 +8,20 @@ missing C library functions.
Generic Functions
-----------------
- `chomp(str)`
Perl like chomp function, chop off last char if newline.
- `copyfile(src, dst, len, symlink)`
Like the shell `cp(1)` and `dd(1),` can also create symlinks.
- `dir(dir, ext, filter, list, strip)`
Wrapper for `scandir()` with optional filter. Returns a list of
names: files and directories that must be freed after use. See
the unit test at the bottom for an example.
- `rsync(src, dst, delete, *filter())`
Very simple `rsync()` to copy files files and directories
recursively.
- `copyfile(src, dst, len, symlink)`
Like the shell `cp(1)` and `dd(1),` can also create symlinks.
- `fexist(file)`
Check for the existance of a file, returns True(1) or False(0).
@@ -35,6 +34,11 @@ Generic Functions
Returns the `mode_t` bits of a file or directory.
- `rsync(src, dst, delete, *filter())`
Very simple `rsync()` to copy files files and directories
recursively.
OpenBSD Functions
-----------------
@@ -50,7 +54,6 @@ TODO
----
- Improve documentation, possibly use kdoc or gdoc2 to generate docs from API.
- Add `chomp()` from Finit
<!--