public void Parent_Folder_Of_Root_Should_Be_Null() { root = provider.GetFileSystemRoot(); Assert.IsNull(root.ParentFolderPath); root = provider.GetFolderInfo(root.FullName); Assert.IsNull(root.ParentFolderPath); }
/// <summary> /// A builder method which creates a new <see cref="VirtualFolder"/> instance /// that represents an (already existing) folder on a given file system. /// </summary> /// <param name="fileSystem">The file system to be used.</param> /// <param name="virtualFolderPath">The qualified path (corresponding to /// <see cref="VirtualResourceInfo.FullName"/> that identifies the folder on the /// file system.</param> /// <returns>A representation of the folder on the file system.</returns> /// <exception cref="ArgumentNullException">If any of the parameters /// is a null reference.</exception> /// <exception cref="VirtualResourceNotFoundException">If the folder cannot /// be found.</exception> /// <exception cref="ResourceAccessException">If the user does not have /// permission to access this resource.</exception> public static VirtualFolder Create(IFileSystemProvider fileSystem, string virtualFolderPath) { if (fileSystem == null) { throw new ArgumentNullException("fileSystem"); } if (virtualFolderPath == null) { throw new ArgumentNullException("virtualFolderPath"); } var folderInfo = fileSystem.GetFolderInfo(virtualFolderPath); return(new VirtualFolder(fileSystem, folderInfo)); }