smb_path_creator.py 303 B

123456789101112
  1. class smb_path_creator(str):
  2. _path = ''
  3. def __new__(cls, *args):
  4. return str.__new__(cls, cls.check_first_symbol(
  5. '/'.join(args)))
  6. @classmethod
  7. def check_first_symbol(cls, string):
  8. if "/" not in string[0]:
  9. return "/"+string
  10. return string