public function createFolder($folderName) {
		
		// prefix folder path, when realpath fails (e.g. does not exist)

		if(!($path = realpath($folderName))) {

			$path = $this->path . $folderName;

		}
		
		// throw exception when $folderName cannot be established as subdirectory of current folder
		
		else if (strpos($path, $this->path) !== 0) {
			
			throw new FilesystemFolderException(sprintf("Folder %s cannot be created within folder %s.", $folderName, $this->path));
			
		}
		
		// recursively create folder(s) when when path not already exists
		
		if(!is_dir($path)) {

			if(!@mkdir($path, 0777, TRUE)) {
				throw new FilesystemFolderException(sprintf("Folder %s could not be created!", $path));
			}
			else {
				chmod($path, 0777);
			}

			$path = realpath($path);
		}

		return self::getInstance($path);

	}
public function createFolder($folderName) {
		
		// prefix folder path, when realpath fails (e.g. does not exist)

		if(!($path = realpath($folderName))) {

			$path = $this->path . $folderName;

		}
		
		// throw exception when $folderName cannot be established as subdirectory of current folder
		
		else if (strpos($path, $this->path) !== 0) {
			
			throw new FilesystemFolderException(sprintf("Folder %s cannot be created within folder %s.", $folderName, $this->path));
			
		}
		
		// recursively create folder(s) when when path not already exists
		
		if(!is_dir($path)) {

			if(!@mkdir($path, 0777, TRUE)) {
				throw new FilesystemFolderException(sprintf("Folder %s could not be created!", $path));
			}
			else {
				chmod($path, 0777);
			}

			$path = realpath($path);
		}

		return self::getInstance($path);

	}
public function createFolder ( $ folderName ) { // prefix folder path, when realpath fails (e.g. does not exist) if ( ! ( $ path = realpath ( $ folderName ) ) ) { $ path = $ this -> path . $ folderName ; } // throw exception when $folderName cannot be established as subdirectory of current folder else if ( strpos ( $ path , $ this -> path ) !== 0 ) { throw new FilesystemFolderException ( sprintf ( "Folder %s cannot be created within folder %s." , $ folderName , $ this -> path ) ) ; } // recursively create folder(s) when when path not already exists if ( ! is_dir ( $ path ) ) { if ( ! @ mkdir ( $ path , 0777 , TRUE ) ) { throw new FilesystemFolderException ( sprintf ( "Folder %s could not be created!" , $ path ) ) ; } else { chmod ( $ path , 0777 ) ; } $ path = realpath ( $ path ) ; } return self :: getInstance ( $ path ) ; }
create a new subdirectory
returns newly created FilesystemFolder object

@param string $folderName
@return FilesystemFolder
@throws FilesystemFolderException
create a new subdirectory returns newly created FilesystemFolder object