You are here

public function FeedsFetcherResult::getFilePath in Feeds 7.2

Get a path to a temporary file containing the resource provided by the fetcher.

File will be deleted after DRUPAL_MAXIMUM_TEMP_FILE_AGE.

Return value

string A path to a file containing the raw content as a source.

Throws

Exception If an unexpected problem occurred.

1 method overrides FeedsFetcherResult::getFilePath()
FeedsFileFetcherResult::getFilePath in plugins/FeedsFileFetcher.inc
Overrides parent::getFilePath().

File

plugins/FeedsFetcher.inc, line 76
Contains the FeedsFetcher and related classes.

Class

FeedsFetcherResult
Base class for all fetcher results.

Code

public function getFilePath() {
  if (empty($this->file_path)) {

    // No file exists yet. Save any raw data that we got.
    $this
      ->saveRawToFile();
  }

  // Check if given file exists now.
  $this
    ->checkFile();

  // Return file path.
  return $this
    ->sanitizeFile($this->file_path);
}