mirror of
https://github.com/OrchardCMS/Orchard.git
synced 2026-02-09 09:16:41 +08:00
Expose GetFileHash method on IVirtualPathProvider
--HG-- branch : 1.x
This commit is contained in:
@@ -80,6 +80,14 @@ namespace Orchard.Tests.DisplayManagement.Descriptors {
|
||||
throw new NotImplementedException();
|
||||
}
|
||||
|
||||
public string GetFileHash(string virtualPath) {
|
||||
throw new NotImplementedException();
|
||||
}
|
||||
|
||||
public string GetFileHash(string virtualPath, IEnumerable<string> dependencies) {
|
||||
throw new NotImplementedException();
|
||||
}
|
||||
|
||||
public bool DirectoryExists(string virtualPath) {
|
||||
throw new NotImplementedException();
|
||||
}
|
||||
|
||||
@@ -78,6 +78,14 @@ namespace Orchard.Tests.DisplayManagement.Descriptors {
|
||||
throw new NotImplementedException();
|
||||
}
|
||||
|
||||
public string GetFileHash(string virtualPath) {
|
||||
throw new NotImplementedException();
|
||||
}
|
||||
|
||||
public string GetFileHash(string virtualPath, IEnumerable<string> dependencies) {
|
||||
throw new NotImplementedException();
|
||||
}
|
||||
|
||||
public bool DirectoryExists(string virtualPath) {
|
||||
throw new NotImplementedException();
|
||||
}
|
||||
|
||||
@@ -56,6 +56,14 @@ namespace Orchard.Tests.Stubs {
|
||||
return _fileSystem.GetFileEntry(ToFileSystemPath(virtualPath)).LastWriteTimeUtc;
|
||||
}
|
||||
|
||||
public string GetFileHash(string virtualPath) {
|
||||
throw new NotImplementedException();
|
||||
}
|
||||
|
||||
public string GetFileHash(string virtualPath, IEnumerable<string> dependencies) {
|
||||
throw new NotImplementedException();
|
||||
}
|
||||
|
||||
public bool DirectoryExists(string virtualPath) {
|
||||
return _fileSystem.GetDirectoryEntry(ToFileSystemPath(virtualPath)) != null;
|
||||
}
|
||||
|
||||
@@ -119,6 +119,14 @@ namespace Orchard.FileSystems.VirtualPath {
|
||||
return File.GetLastWriteTimeUtc(MapPath(virtualPath));
|
||||
}
|
||||
|
||||
public string GetFileHash(string virtualPath) {
|
||||
return GetFileHash(virtualPath, new[] {virtualPath});
|
||||
}
|
||||
|
||||
public string GetFileHash(string virtualPath, IEnumerable<string> dependencies) {
|
||||
return HostingEnvironment.VirtualPathProvider.GetFileHash(virtualPath, dependencies);
|
||||
}
|
||||
|
||||
public virtual string MapPath(string virtualPath) {
|
||||
return HostingEnvironment.MapPath(virtualPath);
|
||||
}
|
||||
|
||||
@@ -15,6 +15,8 @@ namespace Orchard.FileSystems.VirtualPath {
|
||||
StreamWriter CreateText(string virtualPath);
|
||||
Stream CreateFile(string virtualPath);
|
||||
DateTime GetFileLastWriteTimeUtc(string virtualPath);
|
||||
string GetFileHash(string virtualPath);
|
||||
string GetFileHash(string virtualPath, IEnumerable<string> dependencies);
|
||||
|
||||
bool DirectoryExists(string virtualPath);
|
||||
void CreateDirectory(string virtualPath);
|
||||
|
||||
Reference in New Issue
Block a user