function drush_file_not_empty

8.0.x drush_file_not_empty($file_to_test)
6.x drush_file_not_empty($file_to_test)
7.x drush_file_not_empty($file_to_test)
4.x drush_file_not_empty($file_to_test)
5.x drush_file_not_empty($file_to_test)
master drush_file_not_empty($file_to_test)

Test to see if a file exists and is not empty

2 calls to drush_file_not_empty()
drush_environment_table_inc in includes/
_drush_download_file in includes/
Download a file using wget, curl or file_get_contents. Does not use download cache.


includes/, line 2896
The drush API implementation and helpers.


function drush_file_not_empty($file_to_test) {
  if (file_exists($file_to_test)) {
    $stat = stat($file_to_test);
    if ($stat['size'] > 0) {
      return TRUE;
  return FALSE;