using System;
using System.Diagnostics;
using System.IO;
namespace WebDAVSharp.Server.Stores.DiskStore {
///
/// This class implements a disk-based .
///
[DebuggerDisplay("Disk Store ({RootPath})")]
public sealed class WebDavDiskStore : IWebDavStore {
private readonly string _rootPath;
///
/// Initializes a new instance of the class.
///
/// The root path of a folder on disk to host in this .
///
///
/// is null.
/// specifies a folder that does not exist.
public WebDavDiskStore(string rootPath) {
if (rootPath == null)
throw new ArgumentNullException(rootPath);
if (!Directory.Exists(rootPath))
throw new DirectoryNotFoundException(rootPath);
_rootPath = rootPath;
}
///
/// Gets the root path for the folder that is hosted in this .
///
///
/// The root path.
///
public string RootPath {
get {
return _rootPath;
}
}
#region IWebDAVStore Members
///
/// Gets the root collection of this .
///
public IWebDavStoreCollection Root {
get {
return new WebDavDiskStoreCollection(null, _rootPath);
}
}
#endregion
}
}