コード例 #1
0
ファイル: Nfs3.cs プロジェクト: Arsslensoft/ALFX
        public Nfs3CreateResult MakeDirectory(Nfs3FileHandle dirHandle, string name, Nfs3SetAttributes attributes)
        {
            MemoryStream  ms     = new MemoryStream();
            XdrDataWriter writer = StartCallMessage(ms, _client.Credentials, 9);

            dirHandle.Write(writer);
            writer.Write(name);
            attributes.Write(writer);

            RpcReply reply = DoSend(ms);

            if (reply.Header.IsSuccess)
            {
                return(new Nfs3CreateResult(reply.BodyReader));
            }
            else
            {
                throw new RpcException(reply.Header.ReplyHeader);
            }
        }
コード例 #2
0
ファイル: Nfs3.cs プロジェクト: Arsslensoft/ALFX
        public Nfs3ModifyResult SetAttributes(Nfs3FileHandle handle, Nfs3SetAttributes newAttributes)
        {
            MemoryStream  ms     = new MemoryStream();
            XdrDataWriter writer = StartCallMessage(ms, _client.Credentials, 2);

            handle.Write(writer);
            newAttributes.Write(writer);
            writer.Write(false);

            RpcReply reply = DoSend(ms);

            if (reply.Header.IsSuccess)
            {
                return(new Nfs3ModifyResult(reply.BodyReader));
            }
            else
            {
                throw new RpcException(reply.Header.ReplyHeader);
            }
        }