Nucleus .Net Core CMS

FileSystemProviders.FileSystemProvider Class

Namespace: Nucleus.Abstractions.FileSystemProviders
Assembly: Nucleus.Abstractions.dll
Abstract class implemented by all file system providers.

Properties

Key Property

File system provider key (from configuration)

Methods

Configure (IConfigurationSection,String) Method

Configure (IConfigurationSection configSection, String HomeDirectory)
Sets the configuration for this instance.
Parameters
Name Type
configSection Microsoft.Extensions.Configuration.IConfigurationSection
HomeDirectory String

CreateFolder (String,String) Method

CreateFolder (String parentPath, String newFolder)
Create a new folder.
Parameters
Name Type
parentPath String
newFolder String

DeleteFolder (String,Boolean) Method

DeleteFolder (String path, Boolean recursive)
Delete an existing folder.
Parameters
Name Type
path String
recursive Boolean

RenameFolder (String,String) Method

RenameFolder (String path, String newName)
Rename an existing folder.
Parameters
Name Type
path String
newName String

ListFolder (String) Method

ListFolder (String path)
List the contents of a folder.
Parameters
Name Type
path String

ListFolder (String,String) Method

ListFolder (String path, String pattern)
List the contents of a folder, filtered by the regular expression specified in pattern.
Parameters
Name Type
path String
pattern String

GetFolder (String) Method

GetFolder (String path)
Get an existing folder.
Parameters
Name Type
path String

GetFile (String) Method

GetFile (String path)
Get an existing file.
Parameters
Name Type
path String

GetFileDirectUrl (String,DateTime) Method

GetFileDirectUrl (String path, DateTime expiresOn)
Get an direct access Url for the file.
Parameters
Name Type
path String
expiresOn DateTime
Remarks
This method can return null to indicate that the file system provider cannot provide a direct Url to the file.

GetFileContents (String) Method

GetFileContents (String path)
Retrieve the contents of an existing file and return as a stream.
Parameters
Name Type
path String

DeleteFile (String) Method

DeleteFile (String path)
Delete an existing file.
Parameters
Name Type
path String

RenameFile (String,String) Method

RenameFile (String path, String newName)
Rename an existing file.
Parameters
Name Type
path String
newName String

SaveFile (String,String,Stream,Boolean) Method

SaveFile (String parentPath, String newFileName, Stream content, Boolean overwrite)
Save a file.
Parameters
Name Type
parentPath String
newFileName String
content System.IO.Stream
overwrite Boolean