'Create a path query. `pattern` must be a path, either to a
file or a directory.
`case_sensitive` can be a bool or `None`, indicating that the
behavior should depend on the filesystem.'

def __init__(self, field, pattern, fast=True, case_sensitive=None):

    super(PathQuery, self).__init__(field, pattern, fast)
    if (case_sensitive is None):
        path = util.bytestring_path(util.normpath(pattern))
        case_sensitive = beets.util.case_sensitive(path)
    self.case_sensitive = case_sensitive
    if (not case_sensitive):
        pattern = pattern.lower()
    self.file_path = util.bytestring_path(util.normpath(pattern))
    self.dir_path = util.bytestring_path(os.path.join(self.file_path, ''))
