Project/Project.py

changeset 155
375e3c884874
parent 153
ef200d69dba0
child 248
f4561c24989a
equal deleted inserted replaced
154:25d288e43a6c 155:375e3c884874
3184 @return project relative path or unchanged path, if fn doesn't 3184 @return project relative path or unchanged path, if fn doesn't
3185 belong to the project (string) 3185 belong to the project (string)
3186 """ 3186 """
3187 return Utilities.fromNativeSeparators(fn.replace(self.ppath + os.sep, "")) 3187 return Utilities.fromNativeSeparators(fn.replace(self.ppath + os.sep, ""))
3188 3188
3189 def getAbsoluteUniversalPath(self, fn):
3190 """
3191 Public method to convert a project relative file path with universal
3192 separators to an absolute file path.
3193
3194 @param fn file or directory name to convert (string)
3195 @return absolute path (string)
3196 """
3197 if not os.path.isabs(fn):
3198 fn = os.path.join(self.ppath, Utilities.toNativeSeparators(fn))
3199 return fn
3200
3189 def isProjectFile(self, fn): 3201 def isProjectFile(self, fn):
3190 """ 3202 """
3191 Public method used to check, if the passed in filename belongs to the project. 3203 Public method used to check, if the passed in filename belongs to the project.
3192 3204
3193 @param fn filename to be checked (string) 3205 @param fn filename to be checked (string)

eric ide

mercurial