public function makeDirectory( $mode = NULL )
    {
        $mode = $mode ? $mode : 0777;

        if ( file_exists($this->path) ){
            if ( is_file($this->path) ){
                throw new MakeDirectoryException($this);
            }
            return;
        }

        $parent_dir = $this->getParent();

        if ( !$parent_dir->exists() ){
            $parent_dir->makeDirectory( $mode );
        }

        $res = @mkdir( $this->path, $mode );
        if ( $res === FALSE ){
            throw new MakeDirectoryException($this);
        }
    }