Example #1
0
 /// <summary>
 /// Initializes a new instance of the <see cref="DotNetFileEntry"/> 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 DotNetFileEntry([NotNull] DotNetFileSystem fileSystem, [NotNull] 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);
 }
Example #2
0
 /// <summary>
 /// Initializes a new instance of the <see cref="DotNetDirectoryEntry"/> 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 DotNetDirectoryEntry([NotNull] DotNetFileSystem fileSystem, [NotNull] 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;
 }
Example #3
0
 public EmptyRootDirectory(EmptyUnixFileSystem fileSystem)
 {
     FileSystem = fileSystem;
     var accessMode = new GenericAccessMode(true, false, false);
     Permissions = new GenericUnixPermissions(accessMode, accessMode, accessMode);
 }