Open Data Catalog v2.0.0
Drupal\common\Util\DrupalFiles Class Reference
Inheritance diagram for Drupal\common\Util\DrupalFiles:

Public Member Functions

 __construct (FileSystemInterface $filesystem, StreamWrapperManager $streamWrapperManager)
 getFilesystem ()
 getStreamWrapperManager ()
 retrieveFile ($url, $destination)
 fileCreateUrl ($uri)
 getPublicFilesDirectory ()

Static Public Member Functions

static create (ContainerInterface $container)

Detailed Description

Definition at line 19 of file DrupalFiles.php.

Constructor & Destructor Documentation

◆ __construct()

Drupal\common\Util\DrupalFiles::__construct ( FileSystemInterface  $filesystem,
StreamWrapperManager  $streamWrapperManager 


Definition at line 39 of file DrupalFiles.php.

Member Function Documentation

◆ create()

static Drupal\common\Util\DrupalFiles::create ( ContainerInterface  $container)


Definition at line 29 of file DrupalFiles.php.

◆ fileCreateUrl()

Drupal\common\Util\DrupalFiles::fileCreateUrl (   $uri)

Given a URI like public:// retrieve the URL.

Definition at line 94 of file DrupalFiles.php.

◆ getFilesystem()

Drupal\common\Util\DrupalFiles::getFilesystem ( )


Definition at line 47 of file DrupalFiles.php.

◆ getPublicFilesDirectory()

Drupal\common\Util\DrupalFiles::getPublicFilesDirectory ( )

Get the full filesystem path to public://.

Definition at line 107 of file DrupalFiles.php.

◆ getStreamWrapperManager()

Drupal\common\Util\DrupalFiles::getStreamWrapperManager ( )


Definition at line 54 of file DrupalFiles.php.

◆ retrieveFile()

Drupal\common\Util\DrupalFiles::retrieveFile (   $url,

Retrieve File.

Stores the file at the given destination and returns the Drupal url for the newly stored file.

Definition at line 64 of file DrupalFiles.php.