Пример #1
0
 def __init__(self, path, **kwargs):
   utils.validate_file_path(path)
   self._path = path
   self._titan_client = kwargs.pop('_titan_client')
   self._file_data = None
   self._real_path = None
   self._meta = None
   self._file_kwargs = kwargs.copy()
Пример #2
0
 def validate_path(path, namespace=None):
   utils.validate_file_path(path)
   if namespace is not None:
     utils.validate_namespace(namespace)
Пример #3
0
 def validate_paths(paths):
   if not hasattr(paths, '__iter__'):
     raise ValueError('"paths" must be an iterable.')
   for path in paths:
     utils.validate_file_path(path)