public function writeDirectory()
    {
        $toDirectory = dirname($this->path);

        if (!file_exists($toDirectory)) {
            mkdir($toDirectory, 0770, true);
        }

        if (!is_dir($toDirectory)) {
            throw new Concentrate_FileException(
                "Could not write to directory {$toDirectory} because it " .
                "exists and is not a directory.",
                0,
                $toDirectory
            );
        }

        return $this;
    }
public function writeDirectory()
    {
        $toDirectory = dirname($this->path);

        if (!file_exists($toDirectory)) {
            mkdir($toDirectory, 0770, true);
        }

        if (!is_dir($toDirectory)) {
            throw new Concentrate_FileException(
                "Could not write to directory {$toDirectory} because it " .
                "exists and is not a directory.",
                0,
                $toDirectory
            );
        }

        return $this;
    }
public function writeDirectory ( ) { $ toDirectory = dirname ( $ this -> path ) ; if ( ! file_exists ( $ toDirectory ) ) { mkdir ( $ toDirectory , 0770 , true ) ; } if ( ! is_dir ( $ toDirectory ) ) { throw new Concentrate_FileException ( "Could not write to directory {$toDirectory} because it " . "exists and is not a directory." , 0 , $ toDirectory ) ; } return $ this ; }
Creates a directory for this path if such a directory does not already
exist

The last item in this path is considered the file and is stripped off the
path before the directory is created. For example, this creates the
directory '/foo/bar':
<code>
<?php
$path = new Concentrate_Path('/foo/bar/baz');
$path->writeDirectory();
?>
</code>

@return Concentrate_Path the current object for fluent interface.

@throws Concentrate_FileException if the directory could not be created.
Creates a directory for this path if such a directory does not already exist