Esempio n. 1
0
File: project.py Progetto: 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
Esempio 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
Esempio n. 3
0
File: project.py Progetto: 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)  
Esempio 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)