Revision 5e31048f trunk/Pithos.Interfaces/FileInfoExtensions.cs
b/trunk/Pithos.Interfaces/FileInfoExtensions.cs | ||
---|---|---|
17 | 17 |
if (String.IsNullOrWhiteSpace(path)) |
18 | 18 |
throw new ArgumentNullException("path"); |
19 | 19 |
Contract.EndContractBlock(); |
20 |
|
|
20 |
Contract.Assume(Enum.IsDefined(typeof(StringComparison),StringComparison.InvariantCultureIgnoreCase)); |
|
21 | 21 |
|
22 | 22 |
if (!path.EndsWith("\\")) |
23 | 23 |
path=path.ToLower() + "\\"; |
24 | 24 |
int pathLength = path.Length; |
25 | 25 |
|
26 | 26 |
var filePath = fileInfo.FullName; |
27 |
|
|
27 |
|
|
28 | 28 |
if (!filePath.StartsWith(path,StringComparison.InvariantCultureIgnoreCase)) |
29 | 29 |
throw new ArgumentException(String.Format("The path {0} doesn't contain the file {1}",path,filePath)); |
30 | 30 |
|
Also available in: Unified diff