def __init__(self, parent, file_name, path = None):
PBXObject.__init__(self, parent)
self._single_line = True
if path == None:
self.set_property("path", file_name)
else:
self.set_property("name", file_name)
self.set_property("path", path)
self.set_property("sourceTree", "<group>")
self.ext = posixpath.splitext(file_name)[1]
if self.ext != "":
self.ext = self.ext[1:].lower()
file_type = PBXFileReference.extension_map.get(self.ext, "text")
if self.ext == "gn" or self.ext == "gni":
self.set_property("explicitFileType", file_type)
else:
self.set_property("lastKnownFileType", file_type)
评论列表
文章目录