Function Resource_fs_base->file_convert_filename_to_id
Definitions
sources/resource_fs_base_class.php
- Get the resource ID for a filename (of file). Note that filenames are unique across all folders in a filesystem.
- Visibility: public
- Is abstract?: No
- Is static?: No
- Is final?: No
- Return: array
Parameters
Name | Type | Default | Set | Range | Description |
---|---|---|---|---|---|
$filename | ID_TEXT | required parameter | N/A | N/A | The filename, or filepath |
$resource_type | ?ID_TEXT | Null | N/A | N/A | The resource type (null: assumption of only one folder resource type for this hook; only passed as non-null from overridden functions within hooks that are calling this as a helper function) |
Return
- A pair: The resource type, the resource ID (null: could not find)
- Type: ?array
- Set: N/A
- Range: N/A