Function Resource_fs_base->get_file_size

Definitions

sources/resource_fs_base_class.php

  • Standard Commandr-fs file size function for Commandr-fs hooks.
  • Visibility: public
  • Is abstract?: No
  • Is static?: No
  • Is final?: No

Parameters

Name Type Passed by reference? Variadic? Default Set Range Description
$meta_dir array No No required parameter N/A N/A The current meta-directory path
$meta_root_node string No No required parameter N/A N/A The root node of the current meta-directory
$file_name string No No required parameter N/A N/A The file name
$force_calculate boolean No No required parameter N/A N/A Whether to forcefully calculate a size where we would otherwise return -1 for dynamic
&$commandr_fs object Yes No required parameter N/A N/A A reference to the Commandr filesystem object

Returns

  • The file size (false: failure)
  • Type: ~integer
  • Set: N/A
  • Range: N/A

Preview

Code (PHP)

/**
 * Standard Commandr-fs file size function for Commandr-fs hooks.
 *
 * @param  array $meta_dir The current meta-directory path
 * @param  string $meta_root_node The root node of the current meta-directory
 * @param  string $file_name The file name
 * @param  boolean $force_calculate Whether to forcefully calculate a size where we would otherwise return -1 for dynamic
 * @param  object $commandr_fs A reference to the Commandr filesystem object
 * @return ~integer The file size (false: failure)
 */

public function get_file_size(array $meta_dir, string $meta_root_node, string $file_name, bool $force_calculate, object &$commandr_fs)