Exemplo n.º 1
0
Arquivo: srv.py Projeto: mayli/pinefs
 def create_aux (self, ca, **fil_parms):
     """Utility function called by CREATE, MKDIR, and SYMLINK."""
     rv = rfc1094.diropres ()
     try:
         new_fh, new_fil = self.fs.create_fil (
             ca.where.dir, ca.where.name, **fil_parms)
         new_fil.update (ca.attributes)
         rv.status = rfc1094.NFS_OK
         rv._data = rv.diropok (file = new_fh, attributes = new_fil)
     except fsbase.NFSError, v:
         rv.status = v.err
Exemplo n.º 2
0
 def create_aux (self, ca, **fil_parms):
     """Utility function called by CREATE, MKDIR, and SYMLINK."""
     rv = rfc1094.diropres ()
     try:
         new_fh, new_fil = self.fs.create_fil (
             ca.where.dir, ca.where.name, **fil_parms)
         new_fil.update (ca.attributes)
         rv.status = rfc1094.NFS_OK
         rv._data = rv.diropok (file = new_fh, attributes = new_fil)
     except fsbase.NFSError, v:
         rv.status = v.err
Exemplo n.º 3
0
Arquivo: srv.py Projeto: speidy/pinefs
 def NFSPROC_LOOKUP(self, diropargs):
     dir_fil = self.fs.get_fil(diropargs.dir)
     diropres = rfc1094.diropres()
     if dir_fil != None:
         if dir_fil.type != rfc1094.NFDIR:
             diropres.status = rfc1094.NFSERR_NOTDIR
             return diropres
         fh = dir_fil.get_dir().get(diropargs.name, None)
         if fh != None:
             attr = self.fs.get_fil(fh)
             diropres.status = rfc1094.NFS_OK
             diropres._data = diropres.diropok(file=fh, attributes=attr)
             return diropres
         diropres.status = rfc1094.NFSERR_NOENT
     else:
         diropres.status = rfc1094.NFSERR_STALE
     return diropres
Exemplo n.º 4
0
Arquivo: srv.py Projeto: mayli/pinefs
 def NFSPROC_LOOKUP (self, diropargs):
     dir_fil = self.fs.get_fil (diropargs.dir)
     diropres = rfc1094.diropres ()
     if dir_fil <> None:
         if dir_fil.type <> rfc1094.NFDIR:
             diropres.status = rfc1094.NFSERR_NOTDIR
             return diropres
         fh = dir_fil.get_dir ().get (diropargs.name, None)
         if fh <> None:
             attr = self.fs.get_fil (fh)
             diropres.status = rfc1094.NFS_OK
             diropres._data = diropres.diropok (
                 file = fh, attributes = attr)
             return diropres
         diropres.status = rfc1094.NFSERR_NOENT
     else:
         diropres.status = rfc1094.NFSERR_STALE
     return diropres