Add pathclass.drive for convenient splitdrive.

master
Ethan Dalool 2020-03-12 17:45:42 -07:00
parent f090d7d83d
commit 081313d7ef
1 changed files with 4 additions and 0 deletions

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)