public Nfs3FileHandle Lookup(Nfs3FileHandle dirHandle, string name) { Nfs3LookupResult result = _nfsClient.Lookup(dirHandle, name); if (result.ObjectAttributes != null && result.ObjectHandle != null) { _cachedAttributes[result.ObjectHandle] = result.ObjectAttributes; } if (result.DirAttributes != null) { _cachedAttributes[dirHandle] = result.DirAttributes; } if (result.Status == Nfs3Status.Ok) { return(result.ObjectHandle); } else if (result.Status == Nfs3Status.NoSuchEntity) { return(null); } else { throw new Nfs3Exception(result.Status); } }
public bool Equals(Nfs3LookupResult other) { if (other == null) { return(false); } return(other.Status == Status && object.Equals(other.ObjectHandle, ObjectHandle) && object.Equals(other.ObjectAttributes, ObjectAttributes) && object.Equals(other.DirAttributes, DirAttributes)); }