Skip to content

Commit 740e8ac

Browse files
committed
Make protected an argument
1 parent bfbcdfd commit 740e8ac

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

pyiron_snippets/files.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -40,15 +40,15 @@ def categorize_folder_items(folder_path):
4040

4141

4242
class DirectoryObject:
43-
def __init__(self, directory: str | Path | DirectoryObject):
43+
def __init__(self, directory: str | Path | DirectoryObject, protected: bool = False):
4444
if isinstance(directory, str):
4545
self.path = Path(directory)
4646
elif isinstance(directory, Path):
4747
self.path = directory
4848
elif isinstance(directory, DirectoryObject):
4949
self.path = directory.path
5050
self.create()
51-
self._protected = False
51+
self._protected = protected
5252

5353
def __getstate__(self):
5454
self._protected = True

0 commit comments

Comments
 (0)