file_directory_path

Versions
mediamosa-21
file_directory_path($scheme = NULL)

Determines the local directory path of a given wrapper.

This function will return the directory path of a stream wrapper. A stream is referenced as: "scheme://target". For example, a scheme of "public" might return "sites/default/files" or "temporary" might return "/tmp".

Parameters

$scheme A string representing the scheme of a stream. The default wrapper is is assumed if this is not provided.

Return value

A string containing the directory path of a stream. FALSE is returned if the scheme is invalid or a wrapper could not be instantiated.

Related topics

▾ 24 functions call file_directory_path()

coder_upgrade_conversions_form in sites/all/modules/coder/coder_upgrade/coder_upgrade.module
Form builder for the module conversion form.
coder_upgrade_conversions_form_submit in sites/all/modules/coder/coder_upgrade/coder_upgrade.module
Submit handler for the module conversion form.
coder_upgrade_help in sites/all/modules/coder/coder_upgrade/coder_upgrade.help.inc
Implement hook_help().
coder_upgrade_install in sites/all/modules/coder/coder_upgrade/coder_upgrade.install
Implement hook_install().
coder_upgrade_log_path in sites/all/modules/coder/coder_upgrade/coder_upgrade.module
Return path to log file.
coder_upgrade_make_patch_file in sites/all/modules/coder/coder_upgrade/conversions/coder_upgrade.main.inc
Make a patch file of the conversion routine changes.
coder_upgrade_patch_path in sites/all/modules/coder/coder_upgrade/coder_upgrade.module
Return path to patch file.
coder_upgrade_requirements in sites/all/modules/coder/coder_upgrade/coder_upgrade.install
Implement hook_requirements().
coder_upgrade_settings_form in sites/all/modules/coder/coder_upgrade/coder_upgrade.module
Form builder for the settings form.
coder_upgrade_settings_form_submit in sites/all/modules/coder/coder_upgrade/coder_upgrade.module
Submit handler for the settings form.
coder_upgrade_uninstall in sites/all/modules/coder/coder_upgrade/coder_upgrade.install
Implement hook_uninstall().
drupal_aggregate_css in includes/common.inc
Default callback to aggregate CSS files and inline content.
drupal_get_js in includes/common.inc
Returns a themed presentation of all JavaScript code for the current page.
image_install in modules/image/image.install
Implements hook_install().
image_uninstall in modules/image/image.install
Implements hook_uninstall().
simpletest_generate_file in modules/simpletest/simpletest.module
Generate test file.
simpletest_run_tests in modules/simpletest/simpletest.module
Actually runs tests.
simpletest_uninstall in modules/simpletest/simpletest.install
Implements hook_uninstall().
system_file_system_settings in modules/system/system.admin.inc
Form builder; Configure the site file handling.
update_manager_file_get in modules/update/update.manager.inc
Copies a file from $url to the temporary directory for updates.
user_admin_settings in modules/user/user.admin.inc
Form builder; Configure user settings for this site.
_drupal_bootstrap_full in includes/common.inc
_file_generic_settings_file_directory_validate in modules/file/file.field.inc
Element validate callback for the file destination field.
_update_manager_extract_directory in modules/update/update.manager.inc
Return the directory where update archive files should be extracted.

Code

includes/file.inc, line 1691

<?php
function file_directory_path($scheme = NULL) {
  if (empty($scheme)) {
    $scheme = variable_get('file_default_scheme', 'public');
  }
  if ($wrapper = file_stream_wrapper_get_instance_by_scheme($scheme)) {
    return $wrapper->getDirectoryPath();
  }
  else {
    return FALSE;
  }
}
?>