# Path: wikked/utils.py
# class PageNotFoundError(Exception):
#     """ An error raised when no physical file
#        is found for a given URL.
#     """
#     def __init__(self, url, message=None, *args):
#         Exception.__init__(self, url, message, *args)
# 
#     @property
#     def url(self):
#         return self.args[0]
# 
#     def __str__(self):
#         url = self.args[0]
#         message = self.args[1]
#         res = "Can't find page '%s'." % url
#         if message:
#             res += ' ' + message
#         return res
# 
# class NamespaceNotFoundError(Exception):
#     """ An error raised when no physical directory is found
#         for a given URL.
#     """
#     pass
# 
# def split_page_url(url):
#     m = endpoint_regex.match(url)
#     if m is None:
#         return (None, url)
#     endpoint = m.group(1)
#     path = m.group(2)
#     return (endpoint, path)


import os
import os.path
import re
import codecs
import fnmatch
import logging
import itertools
from .utils import (PageNotFoundError, NamespaceNotFoundError,
                    split_page_url)


META_ENDPOINT = '_meta'

logger = logging.getLogger(__name__)

valid_filename_pattern = re.compile('^[\w \.\-\(\)\[\]\\/]+$', re.UNICODE)


class PageInfo(object):
    def __init__(self, url, path):
        self.url = url
        self.path = path
        self._content = None

    @property

# Path: wikked/utils.py
# class PageNotFoundError(Exception):
#     """ An error raised when no physical file
#        is found for a given URL.
#     """
#     def __init__(self, url, message=None, *args):
#         Exception.__init__(self, url, message, *args)
# 
#     @property
#     def url(self):
#         return self.args[0]
# 
#     def __str__(self):
#         url = self.args[0]
#         message = self.args[1]
#         res = "Can't find page '%s'." % url
#         if message:
#             res += ' ' + message
#         return res
# 
# class NamespaceNotFoundError(Exception):
#     """ An error raised when no physical directory is found
#         for a given URL.
#     """
#     pass
# 
# def split_page_url(url):
#     m = endpoint_regex.match(url)
#     if m is None:
#         return (None, url)
#     endpoint = m.group(1)
#     path = m.group(2)
#     return (endpoint, path)


# Path: wikked/fs.py
import os
import os.path
import re
import codecs
import fnmatch
import logging
import itertools
from .utils import (PageNotFoundError, NamespaceNotFoundError,
                    split_page_url)



META_ENDPOINT = '_meta'

logger = logging.getLogger(__name__)

valid_filename_pattern = re.compile('^[\w \.\-\(\)\[\]\\/]+$', re.UNICODE)


class PageInfo(object):
    def __init__(self, url, path):
        self.url = url
        self.path = path
        self._content = None

    @property

    def content(self):