We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
2 parents 0e60d49 + 740e8ac commit f34e492Copy full SHA for f34e492
pyiron_snippets/files.py
@@ -42,7 +42,7 @@ def categorize_folder_items(folder_path):
42
43
44
class DirectoryObject:
45
- def __init__(self, directory: str | Path | DirectoryObject):
+ def __init__(self, directory: str | Path | DirectoryObject, protected: bool = False):
46
if isinstance(directory, str):
47
path = Path(directory)
48
elif isinstance(directory, Path):
@@ -51,7 +51,7 @@ def __init__(self, directory: str | Path | DirectoryObject):
51
path = directory.path
52
self.path: Path = path
53
self.create()
54
- self._protected = False
+ self._protected = protected
55
56
def __getstate__(self):
57
self._protected = True
0 commit comments