function tripal_get_files_stream

2.x tripal_get_files_stream($module_name = FALSE)

Retreives the Drupal stream (e.g. public://...) for a Tripal module.

Each Tripal module has a unique data directory which was created using the tripal_create_files_dir function during installation. This function retrieves the directory path.

@returns The path within the Drupal installation where the data directory resides


$module_name: (Optional) The name of the module.

Related topics

1 call to tripal_get_files_stream()
chado_phylotree_form in tripal_phylogeny/includes/
Implementation of hook_form().


tripal_core/api/, line 114
Provides an application programming interface (API) for managing files within the Tripal data directory structure.


function tripal_get_files_stream($module_name = FALSE) {
  // Build the directory path.
  $stream = 'public://tripal';

  // If a module name is provided then append the module directory.
  if ($module_name) {
    $stream .= "/$module_name";

    // Make sure the directory exists.

  return $stream;