Add aliases assert_is_dir, assert_not_dir.

This commit is contained in:
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

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)