public function deleteDirectory( $path, $strict = FALSE )
    {
        if ( !file_exists( $path ) )
        {
            if ( $strict )
            {
                $result = FALSE;
            }

            $result = TRUE;
        }
        else
        {
            try
            {
                foreach ( scandir( $path ) as $file )
                {
                    if ( '.' === $file || '..' === $file )
                    {
                        continue;
                    }

                    if ( is_dir( $path . DS . $file ) )
                    {
                        $this->deleteDirectory( $path . DS . $file );
                    }
                    else
                    {
                        unlink( $path . DS . $file );
                    }
                }

                $result = rmdir( $path );
            }
            catch ( Exception $e )
            {
                $result = $e;
            }
        }

        return $result;
    }