Revision cfed7823 trunk/Pithos.Core/IStatusKeeper.cs
b/trunk/Pithos.Core/IStatusKeeper.cs | ||
---|---|---|
13 | 13 |
{ |
14 | 14 |
void SetFileOverlayStatus(string path,FileOverlayStatus status); |
15 | 15 |
void UpdateFileChecksum(string path, string checksum); |
16 |
void RemoveFileOverlayStatus(string path); |
|
17 | 16 |
void SetFileStatus(string path, FileStatus status); |
18 | 17 |
FileStatus GetFileStatus(string path); |
19 | 18 |
void ClearFileStatus(string path); |
... | ... | |
38 | 37 |
public void SetFileOverlayStatus(string path, FileOverlayStatus status) |
39 | 38 |
{ |
40 | 39 |
Contract.Requires(!String.IsNullOrWhiteSpace(path)); |
40 |
Contract.Requires(Path.IsPathRooted(path)); |
|
41 | 41 |
} |
42 | 42 |
|
43 | 43 |
public void UpdateFileChecksum(string path, string checksum) |
44 | 44 |
{ |
45 | 45 |
Contract.Requires(!String.IsNullOrWhiteSpace(path)); |
46 | 46 |
Contract.Requires(checksum!=null); |
47 |
Contract.Requires(Path.IsPathRooted(path)); |
|
47 | 48 |
} |
48 | 49 |
|
49 |
public void RemoveFileOverlayStatus(string path) |
|
50 |
/* public void RemoveFileOverlayStatus(string path)
|
|
50 | 51 |
{ |
51 | 52 |
Contract.Requires(!String.IsNullOrWhiteSpace(path)); |
52 |
} |
|
53 |
Contract.Requires(Path.IsPathRooted(path)); |
|
54 |
}*/ |
|
53 | 55 |
|
54 | 56 |
public void RenameFileOverlayStatus(string oldPath, string newPath) |
55 | 57 |
{ |
56 | 58 |
Contract.Requires(!String.IsNullOrWhiteSpace(oldPath)); |
59 |
Contract.Requires(Path.IsPathRooted(oldPath)); |
|
57 | 60 |
Contract.Requires(!String.IsNullOrWhiteSpace(newPath)); |
61 |
Contract.Requires(Path.IsPathRooted(newPath)); |
|
58 | 62 |
|
59 | 63 |
} |
60 | 64 |
|
61 | 65 |
public void SetFileStatus(string path, FileStatus status) |
62 | 66 |
{ |
63 | 67 |
Contract.Requires(!String.IsNullOrWhiteSpace(path)); |
68 |
Contract.Requires(Path.IsPathRooted(path)); |
|
64 | 69 |
} |
65 | 70 |
|
66 | 71 |
public FileStatus GetFileStatus(string path) |
67 | 72 |
{ |
68 | 73 |
Contract.Requires(!String.IsNullOrWhiteSpace(path)); |
74 |
Contract.Requires(Path.IsPathRooted(path)); |
|
69 | 75 |
|
70 | 76 |
return default(FileStatus); |
71 | 77 |
} |
... | ... | |
73 | 79 |
public FileOverlayStatus GetFileOverlayStatus(string path) |
74 | 80 |
{ |
75 | 81 |
Contract.Requires(!String.IsNullOrWhiteSpace(path)); |
82 |
Contract.Requires(Path.IsPathRooted(path)); |
|
76 | 83 |
|
77 | 84 |
return default(FileOverlayStatus); |
78 | 85 |
} |
... | ... | |
80 | 87 |
public void ProcessExistingFiles(IEnumerable<FileInfo> paths) |
81 | 88 |
{ |
82 | 89 |
Contract.Requires(paths!=null); |
83 |
|
|
84 | 90 |
} |
85 | 91 |
|
86 | 92 |
public void Stop() |
... | ... | |
91 | 97 |
public void SetFileState(string path, FileStatus fileStatus, FileOverlayStatus overlayStatus) |
92 | 98 |
{ |
93 | 99 |
Contract.Requires(!String.IsNullOrWhiteSpace(path)); |
100 |
Contract.Requires(Path.IsPathRooted(path)); |
|
94 | 101 |
} |
95 | 102 |
|
96 | 103 |
public void StoreInfo(string path, ObjectInfo objectInfo) |
97 | 104 |
{ |
98 | 105 |
Contract.Requires(!String.IsNullOrWhiteSpace(path)); |
99 |
Contract.Requires(objectInfo!=null); |
|
106 |
Contract.Requires(objectInfo!=null); |
|
107 |
Contract.Requires(Path.IsPathRooted(path)); |
|
100 | 108 |
} |
101 | 109 |
|
102 | 110 |
public T GetStatus<T>(string path, Func<FileState, T> getter, T defaultValue) |
103 | 111 |
{ |
104 | 112 |
Contract.Requires(!String.IsNullOrWhiteSpace(path)); |
105 | 113 |
Contract.Requires(getter!=null); |
114 |
Contract.Requires(Path.IsPathRooted(path)); |
|
106 | 115 |
|
107 | 116 |
return default(T); |
108 | 117 |
} |
... | ... | |
111 | 120 |
{ |
112 | 121 |
Contract.Requires(!String.IsNullOrWhiteSpace(path)); |
113 | 122 |
Contract.Requires(setter != null); |
123 |
Contract.Requires(Path.IsPathRooted(path)); |
|
114 | 124 |
} |
115 | 125 |
|
116 | 126 |
public void SetNetworkState(string path, NetworkOperation operation) |
117 | 127 |
{ |
118 | 128 |
Contract.Requires(!String.IsNullOrWhiteSpace(path)); |
119 |
Contract.Requires(Path.IsPathRooted(path)); |
|
129 |
Contract.Requires(Path.IsPathRooted(path)); |
|
130 |
Contract.Requires(Path.IsPathRooted(path)); |
|
120 | 131 |
} |
121 | 132 |
|
122 | 133 |
public NetworkOperation GetNetworkState(string path) |
123 | 134 |
{ |
124 | 135 |
Contract.Requires(!String.IsNullOrWhiteSpace(path)); |
136 |
Contract.Requires(Path.IsPathRooted(path)); |
|
125 | 137 |
|
126 | 138 |
return default(NetworkOperation); |
127 | 139 |
} |
... | ... | |
129 | 141 |
public void ClearFileStatus(string path) |
130 | 142 |
{ |
131 | 143 |
Contract.Requires(!String.IsNullOrWhiteSpace(path)); |
144 |
Contract.Requires(Path.IsPathRooted(path)); |
|
132 | 145 |
} |
133 | 146 |
|
134 | 147 |
public void SetPithosStatus(PithosStatus status) |
Also available in: Unified diff