Exemplo n.º 1
0
Arquivo: project.py Projeto: ccock/cup
 def get_file_type(self, path):
     full_path = FileUtils.get_full_path(path)
     relative_path = FileUtils.get_rid_of_prefix_path(full_path, self.root)
     root = relative_path.split(os.path.sep)[0]
     if root == 'test': return 'test_file'
     elif root == 'include': return 'header_file'
     elif root == 'src': return 'src_file'
     else: return None
Exemplo n.º 2
0
 def get_file_type(self, path):
     full_path = FileUtils.get_full_path(path)
     relative_path = FileUtils.get_rid_of_prefix_path(full_path, self.root)
     root = relative_path.split(os.path.sep)[0]
     if root == 'test': return 'test_file'
     elif root == 'include': return 'header_file'
     elif root == 'src': return 'src_file'
     else: return None
Exemplo n.º 3
0
Arquivo: project.py Projeto: ccock/cup
 def get_relative_path(self, path):
     relative_path = FileUtils.get_rid_of_prefix_path(path, self.root)
     if relative_path.split(os.path.sep)[0] == 'include':
         relative_path = FileUtils.get_rid_of_top_path(relative_path)
     return FileUtils.get_rid_of_top_path(relative_path)  
Exemplo n.º 4
0
 def get_relative_path(self, path):
     relative_path = FileUtils.get_rid_of_prefix_path(path, self.root)
     if relative_path.split(os.path.sep)[0] == 'include':
         relative_path = FileUtils.get_rid_of_top_path(relative_path)
     return FileUtils.get_rid_of_top_path(relative_path)