You are here

function locale_translate_file_create in Zircon Profile 8

Same name and namespace in other branches
  1. 8.0 core/modules/locale/locale.bulk.inc \locale_translate_file_create()

Creates a file object and populates the timestamp property.

Parameters

string $filepath: The filepath of a file to import.

Return value

object An object representing the file.

File

core/modules/locale/locale.bulk.inc, line 426
Mass import-export and batch import functionality for Gettext .po files.

Code

function locale_translate_file_create($filepath) {
  $file = new stdClass();
  $file->filename = drupal_basename($filepath);
  $file->uri = $filepath;
  $file->timestamp = filemtime($file->uri);
  return $file;
}