文章 ICentralizedFileStorageProvider 类

  • 命名空间: 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