Пример #1
0
        public Nfs3FileStream(Nfs3Client client, Nfs3FileHandle handle, FileAccess access)
        {
            _client = client;
            _handle = handle;
            _access = access;

            _length = _client.GetAttributes(_handle).Size;
        }
Пример #2
0
        /// <summary>
        /// Disposes of this instance, freeing up any resources used.
        /// </summary>
        /// <param name="disposing"><c>true</c> if called from Dispose, else <c>false</c></param>
        protected override void Dispose(bool disposing)
        {
            if (disposing)
            {
                if (_client != null)
                {
                    _client.Dispose();
                    _client = null;
                }
            }

            base.Dispose(disposing);
        }
Пример #3
0
 /// <summary>
 /// Initializes a new instance of the NfsFileSystem class.
 /// </summary>
 /// <param name="address">The address of the NFS server (IP or DNS address)</param>
 /// <param name="credentials">The credentials to use when accessing the NFS server</param>
 /// <param name="mountPoint">The mount point on the server to root the file system</param>
 public NfsFileSystem(string address, RpcCredentials credentials, string mountPoint)
     : base(new NfsFileSystemOptions())
 {
     _client = new Nfs3Client(address, credentials, mountPoint);
 }
Пример #4
0
 /// <summary>
 /// Initializes a new instance of the NfsFileSystem class.
 /// </summary>
 /// <param name="address">The address of the NFS server (IP or DNS address)</param>
 /// <param name="mountPoint">The mount point on the server to root the file system</param>
 /// <remarks>
 /// The created instance uses default credentials.
 /// </remarks>
 public NfsFileSystem(string address, string mountPoint)
     : base(new NfsFileSystemOptions())
 {
     _client = new Nfs3Client(address, RpcUnixCredential.Default, mountPoint);
 }