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

5 calls to drush_file_not_empty()
drush_core_pre_site_install in commands/core/
Perform setup tasks for installation.
drush_core_runserver_validate in commands/runserver/
Validate callback for runserver command.
drush_environment_table_lib in includes/
_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/
Download a file, optionaly with user authentication, using either wget or curl, as available.


includes/, line 609
Filesystem utilities.


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