Add pathclass.drive for convenient splitdrive.

This commit is contained in:
Ethan Dalool 2020-03-12 17:45:42 -07:00
parent f090d7d83d
commit 081313d7ef

View file

@ -139,6 +139,10 @@ class Path:
def dot_extension(self):
return self.extension.with_dot
@property
def drive(self):
return os.path.splitdrive(self.absolute_path)[0]
@property
def exists(self):
return os.path.exists(self.absolute_path)