Exemplo n.º 1
0
        public Nfs3FileHandle Create(Nfs3FileHandle dirHandle, string name, bool createNew, Nfs3SetAttributes attributes)
        {
            Nfs3CreateResult result = _nfsClient.Create(dirHandle, name, createNew, attributes);

            if (result.Status == Nfs3Status.Ok)
            {
                _cachedAttributes[result.FileHandle] = result.FileAttributes;
                return(result.FileHandle);
            }
            throw new Nfs3Exception(result.Status);
        }
Exemplo n.º 2
0
        public Nfs3FileHandle MakeDirectory(Nfs3FileHandle dirHandle, string name, Nfs3SetAttributes attributes)
        {
            Nfs3CreateResult result = _nfsClient.MakeDirectory(dirHandle, name, attributes);

            if (result.Status == Nfs3Status.Ok)
            {
                _cachedAttributes[result.FileHandle] = result.FileAttributes;
                return(result.FileHandle);
            }
            throw new Nfs3Exception(result.Status);
        }
Exemplo n.º 3
0
        public bool Equals(Nfs3CreateResult other)
        {
            if (other == null)
            {
                return(false);
            }

            return(other.Status == Status &&
                   object.Equals(other.FileHandle, FileHandle) &&
                   object.Equals(other.FileAttributes, FileAttributes) &&
                   object.Equals(other.CacheConsistency, CacheConsistency));
        }