UnityEditor.iOS.Xcode.PBXProject.AddFileImpl C# (CSharp) Method

AddFileImpl() private method

private AddFileImpl ( string path, string projectPath, PBXSourceTree tree, bool isFolderReference ) : string
path string
projectPath string
tree PBXSourceTree
isFolderReference bool
return string
        private string AddFileImpl(string path, string projectPath, PBXSourceTree tree, bool isFolderReference)
        {
            PBXFileReferenceData data;
            path = PBXPath.FixSlashes(path);
            projectPath = PBXPath.FixSlashes(projectPath);
            if (!isFolderReference && (Path.GetExtension(path) != Path.GetExtension(projectPath)))
            {
                throw new Exception("Project and real path extensions do not match");
            }
            string str = this.FindFileGuidByProjectPath(projectPath);
            if (str == null)
            {
                str = this.FindFileGuidByRealPath(path);
            }
            if (str != null)
            {
                return str;
            }
            if (isFolderReference)
            {
                data = PBXFileReferenceData.CreateFromFolderReference(path, PBXPath.GetFilename(projectPath), tree);
            }
            else
            {
                data = PBXFileReferenceData.CreateFromFile(path, PBXPath.GetFilename(projectPath), tree);
            }
            PBXGroupData parent = this.CreateSourceGroup(PBXPath.GetDirectory(projectPath));
            parent.children.AddGUID(data.guid);
            this.FileRefsAdd(path, projectPath, parent, data);
            return data.guid;
        }
PBXProject