Automattic\WooCommerce\Internal\Admin\Logging\FileV2

FileController::get_filename_timestampprivateWC 1.0

Get the creation timestamp encoded in a file's name, or 0 if it doesn't use the standard format.

Method of the class: FileController{}

No Hooks.

Returns

Int.

Usage

// private - for code of main (parent) class only
$result = $this->get_filename_timestamp( $file ): int;
$file(File) (required)
The file to get the timestamp from.

FileController::get_filename_timestamp() code WC 11.0.1

private function get_filename_timestamp( File $file ): int {
	return $file->has_standard_filename() ? $file->get_created_timestamp() : 0;
}