/// <summary> /// Initializes a new instance of the <see cref="RemoteFileEntry"/> class. /// </summary> /// <param name="fileSystem">The file system this entry belongs to</param> /// <param name="info">The <see cref="FileInfo"/> to extract the information from</param> public RemoteFileEntry(RemoteFileSystem fileSystem, FileInfo info) { FileSystem = fileSystem; Info = info; LastWriteTime = new DateTimeOffset(Info.LastWriteTime); CreatedTime = new DateTimeOffset(Info.CreationTimeUtc); var accessMode = new GenericAccessMode(true, true, true); Permissions = new GenericUnixPermissions(accessMode, accessMode, accessMode); }
/// <summary> /// Initializes a new instance of the <see cref="RemoteDirectoryEntry"/> class. /// </summary> /// <param name="fileSystem">The file system this entry belongs to</param> /// <param name="dirInfo">The <see cref="DirectoryInfo"/> to extract the information from</param> /// <param name="isRoot">Is this the root directory?</param> public RemoteDirectoryEntry(RemoteFileSystem fileSystem, DirectoryInfo dirInfo, bool isRoot) { FileSystem = fileSystem; Info = dirInfo; LastWriteTime = new DateTimeOffset(Info.LastWriteTime); CreatedTime = new DateTimeOffset(Info.CreationTimeUtc); var accessMode = new GenericAccessMode(true, true, true); Permissions = new GenericUnixPermissions(accessMode, accessMode, accessMode); IsRoot = isRoot; }