/// <exception cref="System.IO.IOException"/> public static Org.Apache.Hadoop.Nfs.Nfs3.Request.MKNOD3Request Deserialize(XDR xdr ) { FileHandle handle = ReadHandle(xdr); string name = xdr.ReadString(); int type = xdr.ReadInt(); SetAttr3 objAttr = new SetAttr3(); Nfs3FileAttributes.Specdata3 spec = null; if (type == NfsFileType.Nfschr.ToValue() || type == NfsFileType.Nfsblk.ToValue()) { objAttr.Deserialize(xdr); spec = new Nfs3FileAttributes.Specdata3(xdr.ReadInt(), xdr.ReadInt()); } else { if (type == NfsFileType.Nfssock.ToValue() || type == NfsFileType.Nfsfifo.ToValue( )) { objAttr.Deserialize(xdr); } } return(new Org.Apache.Hadoop.Nfs.Nfs3.Request.MKNOD3Request(handle, name, type, objAttr , spec)); }
/// <exception cref="System.IO.IOException"/> public static Org.Apache.Hadoop.Nfs.Nfs3.Request.CREATE3Request Deserialize(XDR xdr ) { FileHandle handle = ReadHandle(xdr); string name = xdr.ReadString(); int mode = xdr.ReadInt(); SetAttr3 objAttr = new SetAttr3(); long verf = 0; if ((mode == Nfs3Constant.CreateUnchecked) || (mode == Nfs3Constant.CreateGuarded )) { objAttr.Deserialize(xdr); } else { if (mode == Nfs3Constant.CreateExclusive) { verf = xdr.ReadHyper(); } else { throw new IOException("Wrong create mode:" + mode); } } return(new Org.Apache.Hadoop.Nfs.Nfs3.Request.CREATE3Request(handle, name, mode, objAttr, verf)); }
/// <exception cref="System.IO.IOException"/> public static Org.Apache.Hadoop.Nfs.Nfs3.Request.MKDIR3Request Deserialize(XDR xdr ) { FileHandle handle = ReadHandle(xdr); string name = xdr.ReadString(); SetAttr3 objAttr = new SetAttr3(); objAttr.Deserialize(xdr); return new Org.Apache.Hadoop.Nfs.Nfs3.Request.MKDIR3Request(handle, name, objAttr ); }
// The name of the link // It contains the target /// <exception cref="System.IO.IOException"/> public static Org.Apache.Hadoop.Nfs.Nfs3.Request.SYMLINK3Request Deserialize(XDR xdr) { FileHandle handle = ReadHandle(xdr); string name = xdr.ReadString(); SetAttr3 symAttr = new SetAttr3(); symAttr.Deserialize(xdr); string symData = xdr.ReadString(); return(new Org.Apache.Hadoop.Nfs.Nfs3.Request.SYMLINK3Request(handle, name, symAttr , symData)); }
/* A client may request that the server check that the object is in an * expected state before performing the SETATTR operation. If guard.check is * TRUE, the server must compare the value of ctime to the current ctime of * the object. If the values are different, the server must preserve the * object attributes and must return a status of NFS3ERR_NOT_SYNC. If check is * FALSE, the server will not perform this check. */ /// <exception cref="System.IO.IOException"/> public static Org.Apache.Hadoop.Nfs.Nfs3.Request.SETATTR3Request Deserialize(XDR xdr) { FileHandle handle = ReadHandle(xdr); SetAttr3 attr = new SetAttr3(); attr.Deserialize(xdr); bool check = xdr.ReadBoolean(); NfsTime ctime; if (check) { ctime = NfsTime.Deserialize(xdr); } else { ctime = null; } return(new Org.Apache.Hadoop.Nfs.Nfs3.Request.SETATTR3Request(handle, attr, check , ctime)); }