locale_translate_file_create

locale_translate_file_create($filepath)

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

1
2
3
4
5
6
7
function locale_translate_file_create($filepath) {
  $file = new stdClass();
  $file->filename = drupal_basename($filepath);
  $file->uri = $filepath;
  $file->timestamp = filemtime($file->uri);
  return $file;
}
doc_Drupal
2025-01-10 15:47:30
Comments
Leave a Comment

Please login to continue.