code: def is_name_allowed(self, path):
          
          assert isinstance(path, basestring), "given path must be a string"
          name = os.path.basename(path)
          if not len(name):
              return False, "empty name is not allowed"
          # exact match
          for em in [self.__repoLock,self.__repoFile,self.__dirInfo,self.__dirLock]:
              if name == em:
                  return False, "name '%s' is reserved for pyrep internal usage"%em
          # pattern match
          for pm in [self.__fileInfo,self.__fileLock]:#,self.__objectDir]:
              if name == pm or (name.endswith(pm[3:]) and name.startswith('.')):
                  return False, "name pattern '%s' is not allowed as result may be reserved for pyrep internal usage"%pm
          # name is ok
          return True, None
docs: Get whether creating a file or a directory from the basenane of the given
          path is allowed
  
          :Parameters:
              #. path (str): The absolute or relative path or simply the file
                 or directory name.
  
          :Returns:
              #. allowed (bool): Whether name is allowed.
              #. message (None, str): Reason for the name to be forbidden.