Install
$ [sudo] npm i -g file-not-empty
$ [sudo] pip install file-not-empty
Features
-
exit 0
if path exists, file and not empty -
exit 1
if path not exists, not file or not empty
Usage
usage: file-not-empty path ...
Examples
$ file-not-empty "not-empty-file" "not-existing-file"
ERROR 'not-existing-file' NOT EXISTS
s1
$ file-not-empty "not-empty-file" "empty file"
ERROR 'not-empty-file' EMPTY
$ echo $?
1
$ file-not-empty "not-empty-file"
$ echo $?
0