Lines Matching full:components

538         # with some or all the components in ocomps.  Note that if
560 # Replace the old components with the new ones.
563 # components, thanks to Python's slice assignment.
827 def lookup(self, fid, components): argument
832 so that caller can provide invalid components like '' or '/').
833 The components must be byte-strings as well, for the same
843 if (isinstance(components, (str, bytes) or
844 not all(isinstance(i, bytes) for i in components))):
846 'components {1!r}'.format(self, components))
851 nwname=len(components), wname=components)
857 '{1}'.format(components, self.getpathX(fid)),
861 if resp.nwqid > len(components):
866 'items'.format(self, components,
868 if resp.nwqid < len(components):
872 missing = components[resp.nwqid]
873 within = _pathcat(startpath, b'/'.join(components[:resp.nwqid]))
877 self.setpath(newfid, _pathcat(startpath, b'/'.join(components)))
880 def lookup_last(self, fid, components): argument
883 As a special case, if components is an empty list, we
886 rfid, wqid = self.lookup(fid, components)
1347 components = [i for i in path.split(b'/') if i != b'']
1348 if len(components) == 0 and not allow_empty:
1350 return components, startdir
1358 components, startdir = self._pathsplit(path, startdir, allow_empty=True)
1359 return self.lookup_last(startdir, components)
1384 components, startdir = self._pathsplit(path, startdir,
1388 fid, qid = self.lookup_last(startdir, components)
1398 if len(components) > 1:
1400 fid, _ = self.lookup(startdir, components[:-1])
1406 components = components[-1:]
1417 nwname=1, wname=components)
1425 self.setpath(fid, _pathcat(self.getpath(startdir), components[0]))
1440 qid, iounit = self._uxcreate(filetype, fid, components[0],
1463 nwname=1, wname=components)
1471 self.setpath(fid, _pathcat(self.getpath(fid), components[0]))
1526 components, startdir = self._pathsplit(path, startdir)
1528 if len(components) > 1:
1529 fid, _ = self.lookup(startdir, components[:-1])
1532 components = components[-1:]
1535 qid = self.mkdir(startdir, components[0], perm, gid)
1537 qid, _ = self.create(startdir, components[0],
1555 components, startdir = self._pathsplit(path, startdir, allow_empty=True)
1556 fid, qid = self.lookup_last(startdir, components)
1589 components, startdir = self._pathsplit(path, startdir)
1590 fid, qid = self.lookup_last(startdir, components)
1662 components, startdir = self._pathsplit(path, startdir, allow_empty=True)
1663 # Look up all components. If
1667 fid, qid = self.lookup_last(startdir, components)
1672 # Note that we must check for "rm -r /" (len(components)==0).
1677 isroot = len(components) == 0