- 命名空间: Limyee.Extensibility.Api.Version1
- 程序集: Limyee.Components.dll
定义
interface ICentralizedFileStorageProvider { string FileStoreKey { get; } ICentralizedFile AddFile(string path, string fileName, Stream contentStream, bool ensureUniqueFileName); void AddPath(string path); ICentralizedFile AddUpdateFile(string path, string fileName, Stream contentStream); void Delete(); void Delete(string path, string fileName); void Delete(string path); ICentralizedFile GetFile(string path, string fileName); IEnumerable<ICentralizedFile> GetFiles(string path, PathSearchOption searchOption); IEnumerable<ICentralizedFile> GetFiles(PathSearchOption searchOption); IEnumerable<string> GetPaths(); IEnumerable<string> GetPaths(string path); void Initialize(string fileStoreKey, XmlNode configurationNode); }
属性
名称 |
类型 |
描述 |
默认值 |
选项 |
FileStoreKey |
string |
方法
ICentralizedFile AddFile(string path, string fileName, Stream contentStream, bool ensureUniqueFileName);
参数
名称 |
类型 |
描述 |
必需 |
默认值 |
选项 |
path |
string |
Path |
是 |
||
fileName |
string |
File Name |
是 |
||
contentStream |
Stream |
Content Stream |
是 |
||
ensureUniqueFileName |
bool |
Ensure Unique File Name |
是 |
返回类型
ICentralizedFile
void AddPath(string path);
参数
名称 |
类型 |
描述 |
必需 |
默认值 |
选项 |
path |
string |
Path |
是 |
ICentralizedFile AddUpdateFile(string path, string fileName, Stream contentStream);
参数
名称 |
类型 |
描述 |
必需 |
默认值 |
选项 |
path |
string |
Path |
是 |
||
fileName |
string |
File Name |
是 |
||
contentStream |
Stream |
Content Stream |
是 |
返回类型
ICentralizedFile
void Delete();
void Delete(string path, string fileName);
参数
名称 |
类型 |
描述 |
必需 |
默认值 |
选项 |
path |
string |
Path |
是 |
||
fileName |
string |
File Name |
是 |
void Delete(string path);
参数
名称 |
类型 |
描述 |
必需 |
默认值 |
选项 |
path |
string |
Path |
是 |
ICentralizedFile GetFile(string path, string fileName);
参数
名称 |
类型 |
描述 |
必需 |
默认值 |
选项 |
path |
string |
Path |
是 |
||
fileName |
string |
File Name |
是 |
返回类型
ICentralizedFile
IEnumerable<ICentralizedFile> GetFiles(string path, PathSearchOption searchOption);
参数
名称 |
类型 |
描述 |
必需 |
默认值 |
选项 |
path |
string |
Path |
是 |
||
searchOption |
PathSearchOption |
Search Option |
是 |
返回类型
IEnumerable<ICentralizedFile>
IEnumerable<ICentralizedFile> GetFiles(PathSearchOption searchOption);
参数
名称 |
类型 |
描述 |
必需 |
默认值 |
选项 |
searchOption |
PathSearchOption |
Search Option |
是 |
返回类型
IEnumerable<ICentralizedFile>
IEnumerable<string> GetPaths();
返回类型
IEnumerable<string>
IEnumerable<string> GetPaths(string path);
参数
名称 |
类型 |
描述 |
必需 |
默认值 |
选项 |
path |
string |
Path |
Required |
返回类型
IEnumerable<string>
void Initialize(string fileStoreKey, XmlNode configurationNode);
参数
名称 |
类型 |
描述 |
必需 |
默认值 |
选项 |
fileStoreKey |
string |
File Store Key |
是 |
||
configurationNode |
XmlNode |
Configuration Node |
是 |