• Share
    • Twitter
    • LinkedIn
    • Facebook
    • Email
  • Feedback
  • Improve this Doc

Class DatabaseFolderProvider

Inheritance
System.Object
FolderProvider
StandardFolderProvider
SecureFolderProvider
DatabaseFolderProvider
Inherited Members
SecureFolderProvider.ProtectedExtension
SecureFolderProvider.IsStorageSecure
SecureFolderProvider.GetFileUrl(IFileInfo)
SecureFolderProvider.GetActualPath(FolderMappingInfo, String, String)
SecureFolderProvider.GetActualPath(IFileInfo)
SecureFolderProvider.GetActualPath(IFolderInfo, String)
StandardFolderProvider.RequiresNetworkConnectivity
StandardFolderProvider.SupportsMoveFile
StandardFolderProvider.SupportsMoveFolder
StandardFolderProvider.AddFolder(String, FolderMappingInfo)
StandardFolderProvider.DeleteFolder(IFolderInfo)
StandardFolderProvider.MoveFolder(String, String, FolderMappingInfo)
StandardFolderProvider.GetActualPath(FolderMappingInfo, String)
StandardFolderProvider.GetActualPath(IFolderInfo)
StandardFolderProvider.GetFileStreamInternal(String)
StandardFolderProvider.GetRelativePath(FolderMappingInfo, String)
FolderProvider.SupportsMappedPaths
FolderProvider.GetProviderList()
FolderProvider.Instance(String)
FolderProvider.AddFolder(String, FolderMappingInfo, String)
FolderProvider.GetSettingsControlVirtualPath()
FolderProvider.GetEncryptedSetting(Hashtable, String)
FolderProvider.EncryptValue(String)
FolderProvider.GetHashCode(IFileInfo)
FolderProvider.GetHashCode(IFileInfo, Stream)
Namespace: DotNetNuke.Services.FileSystem
Assembly: DotNetNuke.dll
Syntax
public class DatabaseFolderProvider : SecureFolderProvider

Methods

| Improve this Doc View Source

AddFile(IFolderInfo, String, Stream)

Adds a new file to the specified folder.

Declaration
public override void AddFile(IFolderInfo folder, string fileName, Stream content)
Parameters
Type Name Description
IFolderInfo folder
System.String fileName
Stream content
Overrides
StandardFolderProvider.AddFile(IFolderInfo, String, Stream)
Remarks

Do not close content Stream.

| Improve this Doc View Source

ClearFileContent(Int32)

Clears the content of the file in the database.

Declaration
public static void ClearFileContent(int fileId)
Parameters
Type Name Description
System.Int32 fileId

The file identifier.

| Improve this Doc View Source

CopyFile(String, String, String, FolderMappingInfo)

Copies the specified file to the destination folder.

Declaration
public override void CopyFile(string folderPath, string fileName, string newFolderPath, FolderMappingInfo folderMapping)
Parameters
Type Name Description
System.String folderPath
System.String fileName
System.String newFolderPath
FolderMappingInfo folderMapping
Overrides
StandardFolderProvider.CopyFile(String, String, String, FolderMappingInfo)
| Improve this Doc View Source

DeleteFile(IFileInfo)

Deletes the specified file.

Declaration
public override void DeleteFile(IFileInfo file)
Parameters
Type Name Description
IFileInfo file
Overrides
StandardFolderProvider.DeleteFile(IFileInfo)
| Improve this Doc View Source

FileExists(IFolderInfo, String)

Checks the existence of the specified file in the underlying system.

Declaration
public override bool FileExists(IFolderInfo folder, string fileName)
Parameters
Type Name Description
IFolderInfo folder
System.String fileName
Returns
Type Description
System.Boolean

true if the file exists, otherwise false.

Overrides
StandardFolderProvider.FileExists(IFolderInfo, String)
| Improve this Doc View Source

FolderExists(String, FolderMappingInfo)

Checks the existence of the specified folder in the underlying system.

Declaration
public override bool FolderExists(string folderPath, FolderMappingInfo folderMapping)
Parameters
Type Name Description
System.String folderPath
FolderMappingInfo folderMapping
Returns
Type Description
System.Boolean

true if the folder exists, otherwise false.

Overrides
StandardFolderProvider.FolderExists(String, FolderMappingInfo)
| Improve this Doc View Source

GetFileAttributes(IFileInfo)

Gets the file attributes of the specified file.

Declaration
public override FileAttributes? GetFileAttributes(IFileInfo file)
Parameters
Type Name Description
IFileInfo file
Returns
Type Description
System.Nullable<FileAttributes>

The file attributes or null.

Overrides
StandardFolderProvider.GetFileAttributes(IFileInfo)
Remarks

Because some Providers don't support file attributes, this methods returns a nullable type to allow them to return null.

| Improve this Doc View Source

GetFiles(IFolderInfo)

Gets the list of file names contained in the specified folder.

Declaration
public override string[] GetFiles(IFolderInfo folder)
Parameters
Type Name Description
IFolderInfo folder
Returns
Type Description
System.String[]

An array of file names.

Overrides
SecureFolderProvider.GetFiles(IFolderInfo)
| Improve this Doc View Source

GetFileSize(IFileInfo)

Gets the file length.

Declaration
public override long GetFileSize(IFileInfo file)
Parameters
Type Name Description
IFileInfo file
Returns
Type Description
System.Int64

The file size.

Overrides
StandardFolderProvider.GetFileSize(IFileInfo)
| Improve this Doc View Source

GetFileStream(IFileInfo)

Gets a file Stream of the specified file.

Declaration
public override Stream GetFileStream(IFileInfo file)
Parameters
Type Name Description
IFileInfo file
Returns
Type Description
Stream

A of the file contents.

Overrides
StandardFolderProvider.GetFileStream(IFileInfo)
| Improve this Doc View Source

GetFileStream(IFolderInfo, IFileInfo, Int32)

Gets a file Stream of the specified file.

Declaration
public override Stream GetFileStream(IFolderInfo folder, IFileInfo file, int version)
Parameters
Type Name Description
IFolderInfo folder
IFileInfo file
System.Int32 version
Returns
Type Description
Stream

A of the file contents.

Overrides
FolderProvider.GetFileStream(IFolderInfo, IFileInfo, Int32)
| Improve this Doc View Source

GetFileStream(IFolderInfo, String)

Gets a file Stream of the specified file.

Declaration
public override Stream GetFileStream(IFolderInfo folder, string fileName)
Parameters
Type Name Description
IFolderInfo folder
System.String fileName
Returns
Type Description
Stream

A of the file contents.

Overrides
StandardFolderProvider.GetFileStream(IFolderInfo, String)
| Improve this Doc View Source

GetFolderProviderIconPath()

Gets the URL of the image to display in FileManager tree.

Declaration
public override string GetFolderProviderIconPath()
Returns
Type Description
System.String

The image URL.

Overrides
SecureFolderProvider.GetFolderProviderIconPath()
| Improve this Doc View Source

GetLastModificationTime(IFileInfo)

Gets the time when the specified file was last modified.

Declaration
public override DateTime GetLastModificationTime(IFileInfo file)
Parameters
Type Name Description
IFileInfo file
Returns
Type Description
DateTime

The last modified .

Overrides
StandardFolderProvider.GetLastModificationTime(IFileInfo)
| Improve this Doc View Source

GetSubFolders(String, FolderMappingInfo)

Gets the list of subfolders for the specified folder.

Declaration
public override IEnumerable<string> GetSubFolders(string folderPath, FolderMappingInfo folderMapping)
Parameters
Type Name Description
System.String folderPath
FolderMappingInfo folderMapping
Returns
Type Description
IEnumerable<System.String>

A sequence of relative sub-folder paths.

Overrides
StandardFolderProvider.GetSubFolders(String, FolderMappingInfo)
| Improve this Doc View Source

IsInSync(IFileInfo)

Indicates if the specified file is synchronized.

Declaration
public override bool IsInSync(IFileInfo file)
Parameters
Type Name Description
IFileInfo file
Returns
Type Description
System.Boolean

true if the file is in sync, otherwise false.

Overrides
StandardFolderProvider.IsInSync(IFileInfo)
| Improve this Doc View Source

MoveFile(IFileInfo, IFolderInfo)

Moves a file to a new folder.

Declaration
public override void MoveFile(IFileInfo file, IFolderInfo destinationFolder)
Parameters
Type Name Description
IFileInfo file
IFolderInfo destinationFolder
Overrides
StandardFolderProvider.MoveFile(IFileInfo, IFolderInfo)
| Improve this Doc View Source

RenameFile(IFileInfo, String)

Renames the specified file using the new filename.

Declaration
public override void RenameFile(IFileInfo file, string newFileName)
Parameters
Type Name Description
IFileInfo file
System.String newFileName
Overrides
StandardFolderProvider.RenameFile(IFileInfo, String)
| Improve this Doc View Source

RenameFolder(IFolderInfo, String)

Renames the specified folder using the new newFolderName.

Declaration
public override void RenameFolder(IFolderInfo folder, string newFolderName)
Parameters
Type Name Description
IFolderInfo folder
System.String newFolderName
Overrides
StandardFolderProvider.RenameFolder(IFolderInfo, String)
| Improve this Doc View Source

SetFileAttributes(IFileInfo, FileAttributes)

Sets the specified attributes to the specified file.

Declaration
public override void SetFileAttributes(IFileInfo file, FileAttributes fileAttributes)
Parameters
Type Name Description
IFileInfo file
FileAttributes fileAttributes
Overrides
StandardFolderProvider.SetFileAttributes(IFileInfo, FileAttributes)
| Improve this Doc View Source

SupportsFileAttributes()

Gets a value indicating if the underlying system supports file attributes.

Declaration
public override bool SupportsFileAttributes()
Returns
Type Description
System.Boolean

true if the provider supports file attributes, otherwise false.

Overrides
StandardFolderProvider.SupportsFileAttributes()
| Improve this Doc View Source

UpdateFile(IFileInfo, Stream)

Updates the content of the specified file. It creates it if it doesn't exist.

Declaration
public override void UpdateFile(IFileInfo file, Stream content)
Parameters
Type Name Description
IFileInfo file
Stream content
Overrides
StandardFolderProvider.UpdateFile(IFileInfo, Stream)
Remarks

Do not close content Stream.

| Improve this Doc View Source

UpdateFile(IFolderInfo, String, Stream)

Updates the content of the specified file. It creates it if it doesn't exist.

Declaration
public override void UpdateFile(IFolderInfo folder, string fileName, Stream content)
Parameters
Type Name Description
IFolderInfo folder
System.String fileName
Stream content
Overrides
StandardFolderProvider.UpdateFile(IFolderInfo, String, Stream)
Remarks

Do not close content Stream.

| Improve this Doc View Source

UpdateFileContent(Int32, Stream)

Updates the content of the file in the database.

Declaration
public static void UpdateFileContent(int fileId, Stream content)
Parameters
Type Name Description
System.Int32 fileId

The file identifier.

Stream content

The new content.

| Improve this Doc View Source

UpdateFileContent(Int32, Byte[])

Updates the content of the file in the database.

Declaration
public static void UpdateFileContent(int fileId, byte[] content)
Parameters
Type Name Description
System.Int32 fileId

The file identifier.

System.Byte[] content

The new content.

Extension Methods

JsonExtensionsWeb.ToJson(Object)
  • View Source
Back to top by the community, for the community... #DNNCMS