You are here

protected function MigrateItemFile::loadFile in Migrate 6.2

Same name and namespace in other branches
  1. 7.2 plugins/sources/files.inc \MigrateItemFile::loadFile()

Default file loader.

1 call to MigrateItemFile::loadFile()
MigrateItemFile::getItem in plugins/sources/files.inc
Return an object representing a file or piece thereof.

File

plugins/sources/files.inc, line 235
Support for migration from files sources.

Class

MigrateItemFile
Implementation of MigrateItem, for retrieving a file from the file system based on source directory and an ID provided by a MigrateList class.

Code

protected function loadFile($item_uri) {

  // Only try load the contents if we have this flag set.
  if ($this->getContents) {
    $data = file_get_contents($item_uri);
  }
  else {
    $data = file_exists($item_uri);
  }
  return $data;
}