function drush_file_is_tarball

8.0.x drush_file_is_tarball($path)
6.x drush_file_is_tarball($path)
7.x drush_file_is_tarball($path)
5.x drush_file_is_tarball($path)
master drush_file_is_tarball($path)

Check whether a file is a supported tarball.

Return value

mixed The file content type if it's a tarball. FALSE otherwise.

3 calls to drush_file_is_tarball()
drush_tarball_extract in includes/
Extract a tarball.
make_download_file_unpack in commands/make/
Unpacks a file to the specified download location.
_drush_sql_query in commands/sql/
Execute a SQL query.


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


function drush_file_is_tarball($path) {
  $content_type = drush_mime_content_type($path);
  $supported = array(
  if (in_array($content_type, $supported)) {
    return $content_type;
  return FALSE;