Class StandardFolderProvider
Inherited Members
Namespace: DotNetNuke.Services.FileSystem
Assembly: DotNetNuke.dll
Syntax
public class StandardFolderProvider : FolderProvider
Properties
| Improve this Doc View SourceRequiresNetworkConnectivity
Gets a value indicating whether gets a value indicating if the provider requires network connectivity to do its tasks.
Declaration
public override bool RequiresNetworkConnectivity { get; }
Property Value
| Type | Description |
|---|---|
| System.Boolean |
Overrides
| Improve this Doc View SourceSupportsMoveFile
Gets a value indicating whether the provider supports the MoveFile(IFileInfo, IFolderInfo) method. If a provider supports the MoveFile(IFileInfo, IFolderInfo) method, the folder manager does not have to implement move by copying the file and then deleting the original.
Declaration
public override bool SupportsMoveFile { get; }
Property Value
| Type | Description |
|---|---|
| System.Boolean |
Overrides
| Improve this Doc View SourceSupportsMoveFolder
Gets a value indicating whether the provider supports the MoveFolder(String, String, FolderMappingInfo) method. If a provider supports the MoveFolder(String, String, FolderMappingInfo) method, the folder manager does not have to implement move by copying the folder and then deleting the original.
Declaration
public override bool SupportsMoveFolder { get; }
Property Value
| Type | Description |
|---|---|
| System.Boolean |
Overrides
Methods
| Improve this Doc View SourceAddFile(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
Remarks
Do not close content Stream.
AddFolder(String, FolderMappingInfo)
Adds a new folder to a specified parent folder.
Declaration
public override void AddFolder(string folderPath, FolderMappingInfo folderMapping)
Parameters
| Type | Name | Description |
|---|---|---|
| System.String | folderPath | |
| FolderMappingInfo | folderMapping |
Overrides
| Improve this Doc View SourceCopyFile(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
| Improve this Doc View SourceDeleteFile(IFileInfo)
Deletes the specified file.
Declaration
public override void DeleteFile(IFileInfo file)
Parameters
| Type | Name | Description |
|---|---|---|
| IFileInfo | file |
Overrides
| Improve this Doc View SourceDeleteFolder(IFolderInfo)
Deletes the specified folder.
Declaration
public override void DeleteFolder(IFolderInfo folder)
Parameters
| Type | Name | Description |
|---|---|---|
| IFolderInfo | folder |
Overrides
| Improve this Doc View SourceFileExists(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
| Improve this Doc View SourceFolderExists(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
| Improve this Doc View SourceGetActualPath(FolderMappingInfo, String, String)
Get actual path to a file.
Declaration
protected virtual string GetActualPath(FolderMappingInfo folderMapping, string folderPath, string fileName)
Parameters
| Type | Name | Description |
|---|---|---|
| FolderMappingInfo | folderMapping | Folder Mapping of the folder. |
| System.String | folderPath | Folder Path where the file is contained. |
| System.String | fileName | Name of the file. |
Returns
| Type | Description |
|---|---|
| System.String | A windows supported path to the file. |
GetActualPath(FolderMappingInfo, String)
Get actual path to a folder in the specified folder mapping.
Declaration
protected virtual string GetActualPath(FolderMappingInfo folderMapping, string folderPath)
Parameters
| Type | Name | Description |
|---|---|---|
| FolderMappingInfo | folderMapping | The folder mapping. |
| System.String | folderPath | The folder path. |
Returns
| Type | Description |
|---|---|
| System.String | A windows supported path to the folder. |
GetActualPath(IFileInfo)
Get actual path to an IFileInfo.
Declaration
protected virtual string GetActualPath(IFileInfo file)
Parameters
| Type | Name | Description |
|---|---|---|
| IFileInfo | file | The file. |
Returns
| Type | Description |
|---|---|
| System.String | A windows supported path to the file. |
GetActualPath(IFolderInfo, String)
Get actual path to a file in specified folder.
Declaration
protected virtual string GetActualPath(IFolderInfo folder, string fileName)
Parameters
| Type | Name | Description |
|---|---|---|
| IFolderInfo | folder | The folder that contains the file. |
| System.String | fileName | The file name. |
Returns
| Type | Description |
|---|---|
| System.String | A windows supported path to the file. |
GetActualPath(IFolderInfo)
Get actual path to a folder.
Declaration
protected virtual string GetActualPath(IFolderInfo folder)
Parameters
| Type | Name | Description |
|---|---|---|
| IFolderInfo | folder | The folder. |
Returns
| Type | Description |
|---|---|
| System.String | A windows supported path to the folder. |
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
Remarks
Because some Providers don't support file attributes, this methods returns a nullable type to allow them to return null.
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
| Improve this Doc View SourceGetFileSize(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
| Improve this Doc View SourceGetFileStream(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 |
Overrides
| Improve this Doc View SourceGetFileStream(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 |
Overrides
| Improve this Doc View SourceGetFileStreamInternal(String)
Declaration
protected Stream GetFileStreamInternal(string filePath)
Parameters
| Type | Name | Description |
|---|---|---|
| System.String | filePath |
Returns
| Type | Description |
|---|---|
| Stream |
GetFileUrl(IFileInfo)
Gets the direct URL to the file.
Declaration
public override string GetFileUrl(IFileInfo file)
Parameters
| Type | Name | Description |
|---|---|---|
| IFileInfo | file |
Returns
| Type | Description |
|---|---|
| System.String | The URL. |
Overrides
| Improve this Doc View SourceGetFolderProviderIconPath()
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
| Improve this Doc View SourceGetLastModificationTime(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
| Improve this Doc View SourceGetRelativePath(FolderMappingInfo, String)
Get the path relative to the root of the FolderMapping.
Declaration
protected virtual string GetRelativePath(FolderMappingInfo folderMapping, string path)
Parameters
| Type | Name | Description |
|---|---|---|
| FolderMappingInfo | folderMapping | Path is relative to this. |
| System.String | path | The path. |
Returns
| Type | Description |
|---|---|
| System.String | A relative path. |
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
| Improve this Doc View SourceIsInSync(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
| Improve this Doc View SourceMoveFile(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
| Improve this Doc View SourceMoveFolder(String, String, FolderMappingInfo)
Moves the folder and files at the specified folder path to the new folder path.
Declaration
public override void MoveFolder(string folderPath, string newFolderPath, FolderMappingInfo folderMapping)
Parameters
| Type | Name | Description |
|---|---|---|
| System.String | folderPath | |
| System.String | newFolderPath | |
| FolderMappingInfo | folderMapping |
Overrides
| Improve this Doc View SourceRenameFile(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
| Improve this Doc View SourceRenameFolder(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
| Improve this Doc View SourceSetFileAttributes(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
| Improve this Doc View SourceSupportsFileAttributes()
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
| Improve this Doc View SourceUpdateFile(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
Remarks
Do not close content Stream.
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
Remarks
Do not close content Stream.