src/Components/LocalFileSystem.php
public function createContainers($containers = [], $check_exist = false)
    {
        if (empty($containers)) {
            return [];
        }

        $out = [];
        foreach ($containers as $key => $folder) {
            try {
                // path is full path, name is relative to root, take either
                $out[$key] = $this->createContainer($folder, $check_exist);
            } catch (\Exception $ex) {
                // error whole batch here?
                $out[$key]['error'] = ['message' => $ex->getMessage(), 'code' => $ex->getCode()];
            }
        }

        return $out;
    }
public function createContainers($containers = [], $check_exist = false)
    {
        if (empty($containers)) {
            return [];
        }

        $out = [];
        foreach ($containers as $key => $folder) {
            try {
                // path is full path, name is relative to root, take either
                $out[$key] = $this->createContainer($folder, $check_exist);
            } catch (\Exception $ex) {
                // error whole batch here?
                $out[$key]['error'] = ['message' => $ex->getMessage(), 'code' => $ex->getCode()];
            }
        }

        return $out;
    }
public function createContainers ( $ containers = [ ] , $ check_exist = false ) { if ( empty ( $ containers ) ) { return [ ] ; } $ out = [ ] ; foreach ( $ containers as $ key => $ folder ) { try { // path is full path, name is relative to root, take either $ out [ $ key ] = $ this -> createContainer ( $ folder , $ check_exist ) ; } catch ( \ Exception $ ex ) { // error whole batch here? $ out [ $ key ] [ 'error' ] = [ 'message' => $ ex -> getMessage ( ) , 'code' => $ ex -> getCode ( ) ] ; } } return $ out ; }
Create multiple containers using array of properties, where at least name is required

@param array $containers
@param bool  $check_exist If true, throws error if the container already exists

@return array
Create multiple containers using array of properties where at least name is required