Skip to main content

assert file exists and not empty

Project description

Install

$ [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

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Filename, size & hash SHA256 hash help File type Python version Upload date
file-not-empty-1.0.0.tar.gz (1.3 kB) Copy SHA256 hash SHA256 Source None

Supported by

Elastic Elastic Search Pingdom Pingdom Monitoring Google Google BigQuery Sentry Sentry Error logging AWS AWS Cloud computing DataDog DataDog Monitoring Fastly Fastly CDN SignalFx SignalFx Supporter DigiCert DigiCert EV certificate StatusPage StatusPage Status page