Fixed help files.
This commit is contained in:
commit
b8f912cc79
1543 changed files with 395123 additions and 0 deletions
67
PluginFramework/StFileInfo.cs
Normal file
67
PluginFramework/StFileInfo.cs
Normal file
|
@ -0,0 +1,67 @@
|
|||
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using System.Text;
|
||||
|
||||
namespace ScrewTurn.Wiki.PluginFramework {
|
||||
|
||||
/// <summary>
|
||||
/// Contains information about a file.
|
||||
/// </summary>
|
||||
/// <remarks>This class is only used for provider-host communication.</remarks>
|
||||
public class StFileInfo : FileDetails {
|
||||
|
||||
private string fullName;
|
||||
private IFilesStorageProviderV30 provider;
|
||||
|
||||
/// <summary>
|
||||
/// Initializes a new instance of the <see cref="T:StFileInfo" /> class.
|
||||
/// </summary>
|
||||
/// <param name="size">The size of the file in bytes.</param>
|
||||
/// <param name="lastModified">The last modification date/time.</param>
|
||||
/// <param name="downloadCount">The download count.</param>
|
||||
/// <param name="fullName">The full name of the file, for example <b>/dir/sub/file.txt</b> or <b>/file.txt</b>.</param>
|
||||
/// <param name="provider">The provider that handles the file.</param>
|
||||
public StFileInfo(long size, DateTime lastModified, int downloadCount, string fullName, IFilesStorageProviderV30 provider)
|
||||
: base(size, lastModified, downloadCount) {
|
||||
|
||||
this.fullName = fullName;
|
||||
this.provider = provider;
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Initializes a new instance of the <see cref="StFileInfo" /> class.
|
||||
/// </summary>
|
||||
/// <param name="details">The file details.</param>
|
||||
/// <param name="fullName">The full name.</param>
|
||||
/// <param name="provider">The provider.</param>
|
||||
public StFileInfo(FileDetails details, string fullName, IFilesStorageProviderV30 provider)
|
||||
: this(details.Size, details.LastModified, details.RetrievalCount, fullName, provider) {
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Gets the full name of the file, for example <b>/dir/sub/file.txt</b> or <b>/file.txt</b>.
|
||||
/// </summary>
|
||||
public string FullName {
|
||||
get { return fullName; }
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Gets the provider that handles the file.
|
||||
/// </summary>
|
||||
public IFilesStorageProviderV30 Provider {
|
||||
get { return provider; }
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Gets the directory path of the file.
|
||||
/// </summary>
|
||||
/// <returns>The directory path.</returns>
|
||||
public string GetDirectory() {
|
||||
return StDirectoryInfo.GetDirectory(fullName);
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
}
|
Loading…
Add table
Add a link
Reference in a new issue