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

Related topics

3 calls to drush_file_not_empty()
drush_core_pre_site_install in commands/core/
Perform setup tasks for installation.
_drush_download_file in includes/
Download a file using wget, curl or file_get_contents. Does not use download cache.
_drush_sync_via_http_download_file in examples/
Downloads a files.


includes/, line 624
Filesystem utilities.


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;