Lines Matching refs:Root
180 # @param Root: Root dir
183 def GetFiles(Root, SkipList=None, FullPath=True):
184 OriPath = os.path.normpath(Root)
186 for Root, Dirs, Files in walk(Root):
198 File = os.path.normpath(os.path.join(Root, File))
207 # @param Root: Root Dir
213 def GetNonMetaDataFiles(Root, SkipList, FullPath, PrefixPath):
214 FileList = GetFiles(Root, SkipList, FullPath)
441 def __init__(self, File='', Root='', AlterRoot='', Type='', IsBinary=False,
447 self.Root = ''
450 self.Root = str(Root)
456 if self.Root:
457 self.Path = os.path.normpath(os.path.join(self.Root, self.File))
458 self.Root = os.path.normpath(CommonPath([self.Root, self.Path]))
462 if self.Root[-1] == ':':
463 self.Root += os.path.sep
467 if self.Root[-1] == os.path.sep:
468 self.File = self.Path[len(self.Root):]
470 self.File = self.Path[len(self.Root) + 1:]
477 if self.Root:
479 self.Dir = os.path.join(self.Root, self.SubDir)
481 self.Dir = self.Root
537 RealFile, RealRoot = RealPath2(self.File, self.Root, self.AlterRoot)
542 elif self.Root:
543 RealFile = os.path.join(self.Root, self.File)
548 if RealRoot != self.Root or RealFile != self.File:
550 (RealRoot != self.Root and RealRoot != \
563 self.Root = RealRoot
711 # @param Root: The string contain the parent path of Path in.
714 def ConvPathFromAbsToRel(Path, Root):
716 Root = os.path.normpath(Root)
717 FullPath = os.path.normpath(os.path.join(Root, Path))
721 # It should be in Root.
724 return FullPath[FullPath.find(Root) + len(Root) + 1:]