summary refs log tree commit diff stats
diff options
context:
space:
mode:
-rw-r--r--code/directory.py15
1 files changed, 15 insertions, 0 deletions
diff --git a/code/directory.py b/code/directory.py
index 4cb9fd72..d8855432 100644
--- a/code/directory.py
+++ b/code/directory.py
@@ -1,3 +1,4 @@
+class FrozenException(Exception): pass
 
 class Directory():
 	def __init__(self, path):
@@ -8,8 +9,11 @@ class Directory():
 		self.mtime = None
 		self.exists = True
 
+		self.frozen = False
+
 	def load_files(self):
 		import os
+		if self.frozen: raise FrozenException()
 		try:
 			self.files = os.listdir(self.path)
 			self.exists = True
@@ -18,6 +22,17 @@ class Directory():
 			self.exists = False
 		self.files_loaded = True
 
+	def clone(self):
+		clone = Directory(self.path)
+		for key in iter(self.__dict__):
+			clone.__dict__[key] = self.__dict__[key]
+		return clone
+
+	def frozenClone(self):
+		clone = self.clone()
+		clone.frozen = True
+		return clone
+
 	def __len__(self):
 		return len(self.files)
 	
<arg@suckless.org> 2007-01-14 22:37:34 +0100 implemented new color scheme accordingly to Sanders proposal' href='/acidbong/suckless/dwm/commit/config.default.h?h=5.7&id=0045ad87dfb32f35fc17b5b8942049cfe84d623c'>0045ad8 ^
fbd3109 ^




b515765 ^
12280f0 ^
3794c62 ^

f196b71 ^


04dec4c ^
338c083 ^
f196b71 ^



3794c62 ^
f196b71 ^
2d81b78 ^
3794c62 ^
04dec4c ^
3794c62 ^

338c083 ^
3794c62 ^
f6e41b0 ^
e461e60 ^
3794c62 ^
f196b71 ^

b515765 ^
04dec4c ^
19dcbc5 ^
2c477cf ^
0ea0343 ^
2c477cf ^
2aef8b9 ^
10bc0ce ^

a923298 ^

2c477cf ^

338c083 ^
2c477cf ^

10bc0ce ^

















2c477cf ^
10bc0ce ^

















2c477cf ^
b515765 ^
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94