Add aliases assert_is_dir, assert_not_dir.

master
voussoir 2021-10-10 00:31:43 -07:00
parent 05586e7e79
commit a4196f2b13
No known key found for this signature in database
GPG Key ID: 5F7554F8C26DACCB
1 changed files with 4 additions and 0 deletions

View File

@ -167,6 +167,8 @@ class Path:
if self.is_dir:
raise IsDirectory(self)
assert_not_dir = assert_not_directory
def assert_not_link(self):
if self.is_link:
raise IsLink(self)
@ -179,6 +181,8 @@ class Path:
if not self.is_dir:
raise NotDirectory(self)
assert_is_dir = assert_is_directory
def assert_is_link(self):
if not self.is_link:
raise NotLink(self)