protected function MigrateItemFile::loadFile in Migrate 7.2
Same name and namespace in other branches
- 6.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 321 - 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;
}