MCPcopy Create free account
hub / github.com/nodejs/node / AddFile

Method AddFile

tools/gyp/pylib/gyp/xcodeproj_file.py:1955–1973  ·  view source on GitHub ↗
(self, path, settings=None)

Source from the content-addressed store, hash-verified

1953 self._AddBuildFileToDicts(pbxbuildfile, path)
1954
1955 def AddFile(self, path, settings=None):
1956 (file_group, hierarchical) = self.FileGroup(path)
1957 file_ref = file_group.AddOrGetFileByPath(path, hierarchical)
1958
1959 if file_ref in self._files_by_xcfilelikeelement and isinstance(
1960 file_ref, PBXVariantGroup
1961 ):
1962 # There's already a PBXBuildFile in this phase corresponding to the
1963 # PBXVariantGroup. path just provides a new variant that belongs to
1964 # the group. Add the path to the dict.
1965 pbxbuildfile = self._files_by_xcfilelikeelement[file_ref]
1966 self._AddBuildFileToDicts(pbxbuildfile, path)
1967 else:
1968 # Add a new PBXBuildFile to get file_ref into the phase.
1969 if settings is None:
1970 pbxbuildfile = PBXBuildFile({"fileRef": file_ref})
1971 else:
1972 pbxbuildfile = PBXBuildFile({"fileRef": file_ref, "settings": settings})
1973 self.AppendBuildFile(pbxbuildfile, path)
1974
1975
1976class PBXHeadersBuildPhase(XCBuildPhase):

Callers 4

AddSourceToTargetFunction · 0.80
AddResourceToTargetFunction · 0.80
AddHeaderToTargetFunction · 0.80
GenerateOutputFunction · 0.80

Calls 5

FileGroupMethod · 0.95
_AddBuildFileToDictsMethod · 0.95
AppendBuildFileMethod · 0.95
PBXBuildFileClass · 0.85
AddOrGetFileByPathMethod · 0.80

Tested by

no test coverage detected