You are here

function _filefield_paths_check_directory in File (Field) Paths 5

Same name and namespace in other branches
  1. 6 filefield_paths.module \_filefield_paths_check_directory()
1 call to _filefield_paths_check_directory()
filefield_paths_file_move in ./filefield_paths.module
Move file and update its database record.

File

./filefield_paths.module, line 649
Adds extra functionality to FileFields Path settings.

Code

function _filefield_paths_check_directory($directory, $form_element = array()) {
  foreach (explode('/', $directory) as $dir) {
    $dirs[] = $dir;
    $path = file_create_path(implode($dirs, '/'));
    file_check_directory($path, FILE_CREATE_DIRECTORY, $form_element['#parents'][0]);
  }
  return TRUE;
}