Example #1
0
 def _setUp(self) -> None:
     self.URL = api_reverse('filesystem:cat')
     repo.create_file(filepath=FilePath('/f1/f2/f3/test'), p_flag=True, data='hello')
     repo.create_file(filepath=FilePath('/f1/f2/f3/f4'), p_flag=True)
Example #2
0
 def _setUp(self) -> None:
     self.URL = api_reverse('filesystem:ls')
     repo.create_file(filepath=FilePath('/abc/def/agh'), p_flag=True, data='hello')
     repo.create_file(filepath=FilePath('/abc/kkk/jkl/abc'), p_flag=True)
Example #3
0
 def _setUp(self) -> None:
     self.URL = api_reverse('filesystem:cd')
     repo.create_file(FilePath('/f1/f2/f3/test'), p_flag=True, data='test')
     repo.create_file(FilePath('/f1/f4/test'), p_flag=True, data='test')
Example #4
0
 def handle(self, path: str, p_flag: bool, data: str, *args, **kwargs) -> Response:
     filepath = FilePath(path)
     repo.create_file(filepath=filepath, p_flag=p_flag, data=data)
     return Response(status=status.HTTP_201_CREATED)