Callback handler for deleting a file

@param string $path The URL of the file to delete
@return bool
554525
public function unlink($path)
    {
        $client = $this->openPath($path);
        $object = $this->bucket->object($this->file);

        try {
            $object->delete();
            return true;
        } catch (ServiceException $e) {
            return false;
        }
    }
232464
public function delete($path)
    {
        $err = Qiniu_RS_Delete($this->getClient(), $this->bucket, $path);
        return $err === null;
    }
265361
public function delete($path)
  {
    $result = false;
    $parts = $this->split($path);

    $name = array_shift($parts);
    if (!sizeof($parts)) {
      if (isset($this->_ownData[$name])) {
        unset($this->_ownData[$name]);
        $result = true;
      }
    } elseif (isset($this->_subTrees[$name])) {
      $subtree = $this->_subTrees[$name];
      /* @var $subtree Wrapper_FS_Changes */

      $result = $subtree->delete($parts);
      if ($result && !$subtree->count()) {
        unset($this->_subTrees[$name]);
      }
    }

    return $result;
  }
95784
public static function delete($path)
    {
        @set_time_limit(ini_get('max_execution_time'));
    
        // Sanity check
        if (!rtrim($path, '/\\'))
        {
            // Bad programmer! Bad Bad programmer!
            throw new \Exception(__METHOD__ . ': You can not delete a base directory.');
        }
    
        // Check to make sure the path valid and clean
        $path = FileHelper::cleanPath($path);
    
        // Is this really a folder?
        if (!is_dir($path))
        {
            throw new \UnexpectedValueException(sprintf('%1$s: Path is not a folder. Path: %2$s', __METHOD__, $path));
        }
    
        // Remove all the files in folder if they exist; disable all filtering
        $files = FileHelper::files($path, true, true);
    
        if (!empty($files)) {
            File::delete($files);
        }
    
        // Remove sub-folders of folder; disable all filtering
        $folders = FileHelper::dirs($path, false, true);
        
        foreach ($folders as $folder) 
        {
            if (is_link($folder))
            {
                // Don't descend into linked directories, just delete the link.
                File::delete($folder);
            }
            else
            {
                static::delete($folder);
            }
        }
    
        // In case of restricted permissions we zap it one way or the other
        // as long as the owner is either the webserver or the ftp.
        if (@rmdir($path))
        {
            return true;
        }
        else
        {
            throw new \Exception(sprintf('%1$s: Could not delete folder. Path: %2$s', __METHOD__, $path));
        }
    }
1199044
public function deleteDirectory($path)
    {
        if (false === $this->exists($path)) {
            return $this;
        }

        $this->getFilesystem()->remove($path);

        return $this;
    }
1312714
public function delete($path, $callback)
    {
        Argument::i()
            //argument 1 should be a string
            ->test(1, 'string')
            //argument 2 should be callable
            ->test(2, 'callable');
        
        return $this->route('delete', $path, $callback);
    }
1264246
public static function delete($path)
    {
        @set_time_limit((int) ini_get('max_execution_time'));

        // Sanity check
        if (!rtrim($path, '/\\')) {
            // Bad programmer! Bad Bad programmer!
            throw new FilesystemException(__METHOD__ . ': You can not delete a base directory.');
        }

        // Check to make sure the path valid and clean
        $path = Path::clean($path);

        // Is this really a folder?
        if (!is_dir($path)) {
            throw new \UnexpectedValueException(sprintf('%1$s: Path is not a folder. Path: %2$s', __METHOD__, $path));
        }

        // Remove all the files in folder if they exist; disable all filtering
        $files = static::files($path);

        if (!empty($files)) {
            File::delete($files);
        }

        // Remove sub-folders of folder; disable all filtering
        $folders = static::items($path);

        foreach ($folders as $folder) {
            if (is_link($folder)) {
                // Don't descend into linked directories, just delete the link.
                File::delete($folder);
            } elseif (is_dir($folder)) {
                static::delete($folder);
            }
        }

        // In case of restricted permissions we zap it one way or the other
        // as long as the owner is either the webserver or the ftp.
        if (@rmdir($path)) {
            return true;
        } else {
            $error = error_get_last();
            throw new FilesystemException($error['message'], $error['type']);
        }
    }
24970
public function delete($path)
    {
        $location = $this->applyPathPrefix($path);

        $command = $this->s3Client->getCommand(
            'deleteObject',
            [
                'Bucket' => $this->bucket,
                'Key'    => $location,
            ]
        );

        $this->s3Client->execute($command);

        return ! $this->has($path);
    }
222080
public function readAndDelete($path)
    {
        [$prefix, $path] = $this->getPrefixAndPath($path);

        return $this->getFilesystem($prefix)->readAndDelete($path);
    }
108465
final public function delete($path)
    {

        //If we have permission to remove this file
        if ($this->isWritable($path)) {
            if (!@unlink($path)) //This is highly unreliable as unlink returns a warning not a bool
            {
                return false;
            }
        } else {
            if (!@unlink($path)) //This is highly unreliable as unlink returns a warning not a bool
            {
                return false;
            }
        }

        return true;
    }
448801
public static function remove($path)
    {
        $removed = 0;

        if (file_exists($path)) {
            if (is_dir($path)) {
                if (false === ($handle = @opendir($path))) {
                    throw PathException::createUsingLastError();
                }

                while (false !== ($item = readdir($handle))) {
                    if (('.' === $item) || ('..' === $item)) {
                        continue;
                    }

                    $removed += self::remove($path . DIRECTORY_SEPARATOR . $item);
                }

                closedir($handle);

                if (!@rmdir($path)) {
                    throw PathException::createUsingLastError();
                }
            } elseif (!@unlink($path)) {
                throw PathException::createUsingLastError();
            }

            $removed++;
        }

        return $removed;
    }
1188128
public function delete($path)
    {
        $paths = is_array($path) ? $path : func_get_args();

        $success = true;

        foreach ($paths as $path) {

            if ($this->isDirectory($path)) {
                $success = $this->laravelFS->deleteDirectory($path);
                continue;
            }
            $success = $this->laravelFS->delete($path);

        }

        return $success;
    }
478062
public function delete($path)
    {
        $path = $this->applyPathPrefix($path);
        $object = $this->bucket->object($path);

        if (false === $object->exists()) {
            return true;
        }

        $object->delete();

        return !$object->exists();
    }
1241473
protected function _unlink($path) {
		return $this->query(sprintf('DELETE FROM %s WHERE id=%d AND mime!="directory" LIMIT 1', $this->tbf, $path)) && $this->db->affected_rows;
	}
797769
public function delete($path)
    {
        $result = $this->client->deleteObject($this->bucket, $path);
        if (is_null($result)) {
            return false;
        }

        return true;
    }
653924
public function delete($path)
    {
        $path = realpath($path);
        if (strpos($path, $this->getDefaultPath()) === 0) {
            if (is_dir($path)) {
                foreach (glob($path . '/*') as $file) {
                    $this->delete($path);
                }
                return @rmdir($path);
            } else {
                return @unlink($path);
            }
        } else {
            throw new \InvalidArgumentException("Path not allowed '$path'");
        }
    }
956295
public static function delete( $path ) 
	{
		$success = false;

		if ( file_exists( $path ) ) 
		{
			$success = unlink( $path );
		}

		if ( static::_can_print() ) 
		{
			if ( $success )
			{
				CCCli::line( CCCli::color( 'removed', 'green' ).' '.$path );
			}
			else 
			{
				CCCli::line( CCCli::color( 'removing failure', 'red' ).' '.$path );
			}
		}

		return $success;
	}