Exemplo n.º 1
0
            public EmptyRootDirectory(EmptyUnixFileSystem fileSystem)
            {
                FileSystem = fileSystem;
                var accessMode = new GenericAccessMode(true, false, false);

                Permissions = new GenericUnixPermissions(accessMode, accessMode, accessMode);
            }
Exemplo n.º 2
0
        public GcsFileEntry(GcsFileSystem fileSystem)
        {
            FileSystem = fileSystem;

            var accessMode = new GenericAccessMode(true, true, true);

            Permissions = new GenericUnixPermissions(accessMode, accessMode, accessMode);
        }
Exemplo n.º 3
0
 public AzureBlobFileSystemEntry(string key, string name)
 {
     Key         = key;
     Name        = name;
     Permissions = new GenericUnixPermissions(
         new GenericAccessMode(true, true, false),
         new GenericAccessMode(true, true, false),
         new GenericAccessMode(true, true, false));
 }
Exemplo n.º 4
0
        /// <summary>
        /// Initializes a new instance of the <see cref="CustomServerDemoEntry"/> class.
        /// </summary>
        /// <param name="fsInfo">The <see cref="FileSystemInfo"/> to extract the information from.</param>
        protected CustomServerDemoEntry(FileSystemInfo fsInfo)
        {
            Info          = fsInfo;
            LastWriteTime = new DateTimeOffset(Info.LastWriteTime);
            CreatedTime   = new DateTimeOffset(Info.CreationTimeUtc);
            var accessMode = new GenericAccessMode(true, true, true);

            Permissions = new GenericUnixPermissions(accessMode, accessMode, accessMode);
        }
Exemplo n.º 5
0
        /// <summary>
        /// Initializes a new instance of the <see cref="DotNetFileSystemEntry"/> class.
        /// </summary>
        /// <param name="fsInfo">The <see cref="FileSystemInfo"/> to extract the information from.</param>
        protected DotNetFileSystemEntry([NotNull] FileSystemInfo fsInfo)
        {
            Info          = fsInfo;
            LastWriteTime = new DateTimeOffset(Info.LastWriteTime);
            CreatedTime   = new DateTimeOffset(Info.CreationTimeUtc);
            var accessMode = new GenericAccessMode(true, true, true);

            Permissions = new GenericUnixPermissions(accessMode, accessMode, accessMode);
        }
Exemplo n.º 6
0
        protected VirtualEntry(VirtualFileSystem parent,
                               VirtualDirectory dir = null)
        {
            Parent   = parent;
            Previous = dir;
            var mode = new GenericAccessMode(true, false, false);

            Permissions = new GenericUnixPermissions(mode, mode, mode);
        }
Exemplo n.º 7
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);
        }
Exemplo n.º 8
0
        /// <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;
        }
        public OneDriveFileSystemEntry([NotNull] OneDriveFileSystem fileSystem, [NotNull] Item item)
        {
            FileSystem = fileSystem;
            var isFolder = item.Folder != null;

            Item        = item;
            Permissions = new GenericUnixPermissions(
                new GenericAccessMode(true, true, isFolder),
                new GenericAccessMode(true, true, isFolder),
                new GenericAccessMode(true, true, isFolder));
        }
 /// <summary>
 /// Initializes a new instance of the <see cref="GoogleDriveFileEntry"/> class.
 /// </summary>
 /// <param name="fileSystem">The file system this entry belongs to</param>
 /// <param name="file">The underlying model</param>
 /// <param name="fullName">The full path and file name of this entry</param>
 /// <param name="fileSize">The file size (if it differs from the one in the model)</param>
 public GoogleDriveFileEntry([NotNull] GoogleDriveFileSystem fileSystem, [NotNull] File file, [NotNull] string fullName, long?fileSize = null)
 {
     FileSystem  = fileSystem;
     File        = file;
     Permissions = new GenericUnixPermissions(
         new GenericAccessMode(true, true, false),
         new GenericAccessMode(true, true, false),
         new GenericAccessMode(true, true, false));
     FullName = fullName;
     Size     = fileSize ?? file.FileSize ?? 0;
 }
Exemplo n.º 11
0
 /// <summary>
 /// Initializes a new instance of the <see cref="GoogleDriveDirectoryEntry"/> class.
 /// </summary>
 /// <param name="file">The directory this entry belongs to.</param>
 /// <param name="fullPath">The full path.</param>
 /// <param name="isRoot">Determines whether this a root directory.</param>
 public GoogleDriveDirectoryEntry(File file, string fullPath, bool isRoot = false)
 {
     File        = file;
     Permissions = new GenericUnixPermissions(
         new GenericAccessMode(true, true, true),
         new GenericAccessMode(true, true, true),
         new GenericAccessMode(true, true, true));
     FullName      = fullPath;
     IsRoot        = isRoot;
     Name          = File.Name;
     NumberOfLinks = File.Parents?.Count ?? 1;
 }
 /// <summary>
 /// Initializes a new instance of the <see cref="GoogleDriveDirectoryEntry"/> class.
 /// </summary>
 /// <param name="fileSystem">The file system this instance belongs to</param>
 /// <param name="file">The directory this entry belongs to</param>
 /// <param name="fullPath">The full path</param>
 /// <param name="isRoot">Is this a root directory?</param>
 public GoogleDriveDirectoryEntry([NotNull] GoogleDriveFileSystem fileSystem, [NotNull] File file, [NotNull] string fullPath, bool isRoot = false)
 {
     FileSystem  = fileSystem;
     File        = file;
     Permissions = new GenericUnixPermissions(
         new GenericAccessMode(true, true, true),
         new GenericAccessMode(true, true, true),
         new GenericAccessMode(true, true, true));
     FullName = fullPath;
     IsRoot   = isRoot;
     Name     = File.Title;
 }
 /// <summary>
 /// Initializes a new instance of the <see cref="GoogleDriveFileEntry"/> class.
 /// </summary>
 /// <param name="file">The underlying model.</param>
 /// <param name="fullName">The full path and file name of this entry.</param>
 /// <param name="fileSize">The file size (if it differs from the one in the model).</param>
 public GoogleDriveFileEntry(
     File file,
     string fullName,
     long?fileSize = null)
 {
     File        = file;
     Permissions = new GenericUnixPermissions(
         new GenericAccessMode(true, true, false),
         new GenericAccessMode(true, true, false),
         new GenericAccessMode(true, true, false));
     FullName      = fullName;
     Size          = fileSize ?? file.Size ?? 0;
     NumberOfLinks = File.Parents?.Count ?? 1;
 }
Exemplo n.º 14
0
        public AzureBlobFileSystemEntry(AzureBlobFileSystem fileSystem, IListBlobItem item)
        {
            FileSystem = fileSystem;
            Item       = item;
            if (Item.GetType().Name == "CloudBlobDirectory")
            {
                IsFolder = true;
            }
            else
            {
                IsFolder = false;
            }

            Permissions = new GenericUnixPermissions(
                new GenericAccessMode(true, true, IsFolder),
                new GenericAccessMode(true, true, IsFolder),
                new GenericAccessMode(true, true, IsFolder));
        }
Exemplo n.º 15
0
            public EmptyRootDirectory()
            {
                var accessMode = new GenericAccessMode(true, false, false);

                Permissions = new GenericUnixPermissions(accessMode, accessMode, accessMode);
            }