Esempio n. 1
0
 public static bool IsBuildable(string ext, bool isFolderReference)
 {
     ext = FileTypeUtils.TrimExtension(ext);
     if (isFolderReference)
     {
         return(true);
     }
     return(FileTypeUtils.IsBuildableFile(ext));
 }
Esempio n. 2
0
 public static string GetTypeName(string ext)
 {
     ext = FileTypeUtils.TrimExtension(ext);
     if (FileTypeUtils.types.ContainsKey(ext))
     {
         return(FileTypeUtils.types[ext].name);
     }
     return("file");
 }
Esempio n. 3
0
 internal static bool IsFileTypeExplicit(string ext)
 {
     ext = FileTypeUtils.TrimExtension(ext);
     if (FileTypeUtils.types.ContainsKey(ext))
     {
         return(FileTypeUtils.types[ext].isExplicit);
     }
     return(false);
 }
Esempio n. 4
0
 public static PBXFileType GetFileType(string ext, bool isFolderRef)
 {
     ext = FileTypeUtils.TrimExtension(ext);
     if (isFolderRef || !FileTypeUtils.types.ContainsKey(ext))
     {
         return(PBXFileType.Resource);
     }
     return(FileTypeUtils.types[ext].type);
 }
Esempio n. 5
0
        public override void UpdateProps()
        {
            string ext = null;

            if (m_ExplicitFileType != null)
            {
                SetPropertyString("explicitFileType", m_ExplicitFileType);
            }
            else if (m_LastKnownFileType != null)
            {
                SetPropertyString("lastKnownFileType", m_LastKnownFileType);
            }
            else
            {
                if (name != null)
                {
                    ext = Path.GetExtension(name);
                }
                else if (m_Path != null)
                {
                    ext = Path.GetExtension(m_Path);
                }
                if (ext != null)
                {
                    if (FileTypeUtils.IsFileTypeExplicit(ext))
                    {
                        SetPropertyString("explicitFileType", FileTypeUtils.GetTypeName(ext));
                    }
                    else
                    {
                        SetPropertyString("lastKnownFileType", FileTypeUtils.GetTypeName(ext));
                    }
                }
            }
            if (m_Path == name)
            {
                SetPropertyString("name", null);
            }
            else
            {
                SetPropertyString("name", name);
            }
            if (m_Path == null)
            {
                SetPropertyString("path", "");
            }
            else
            {
                SetPropertyString("path", m_Path);
            }
            SetPropertyString("sourceTree", FileTypeUtils.SourceTreeDesc(tree));
        }
Esempio n. 6
0
 public override void UpdateVars()
 {
     name = GetPropertyString("name");
     path = GetPropertyString("path");
     if (name == null)
     {
         name = path;
     }
     if (path == null)
     {
         path = "";
     }
     tree = FileTypeUtils.ParseSourceTree(GetPropertyString("sourceTree"));
 }
Esempio n. 7
0
 public override void UpdateVars()
 {
     this.children = (GUIDList)this.GetPropertyList("children");
     this.path     = this.GetPropertyString("path");
     this.name     = this.GetPropertyString("name");
     if (this.name == null)
     {
         this.name = this.path;
     }
     if (this.path == null)
     {
         this.path = "";
     }
     this.tree = FileTypeUtils.ParseSourceTree(this.GetPropertyString("sourceTree"));
 }
Esempio n. 8
0
 public override void UpdateVars()
 {
     name   = GetPropertyString("name");
     m_Path = GetPropertyString("path");
     if (name == null)
     {
         name = m_Path;
     }
     if (m_Path == null)
     {
         m_Path = "";
     }
     tree = FileTypeUtils.ParseSourceTree(GetPropertyString("sourceTree"));
     m_ExplicitFileType  = GetPropertyString("explicitFileType");
     m_LastKnownFileType = GetPropertyString("lastKnownFileType");
 }
Esempio n. 9
0
 public override void UpdateVars()
 {
     this.name   = this.GetPropertyString("name");
     this.m_Path = this.GetPropertyString("path");
     if (this.name == null)
     {
         this.name = this.m_Path;
     }
     if (this.m_Path == null)
     {
         this.m_Path = "";
     }
     this.tree = FileTypeUtils.ParseSourceTree(this.GetPropertyString("sourceTree"));
     this.m_ExplicitFileType  = this.GetPropertyString("explicitFileType");
     this.m_LastKnownFileType = this.GetPropertyString("lastKnownFileType");
 }
Esempio n. 10
0
 public override void UpdateProps()
 {
     this.SetPropertyList("children", (List <string>) this.children);
     if (this.name == this.path)
     {
         this.SetPropertyString("name", (string)null);
     }
     else
     {
         this.SetPropertyString("name", this.name);
     }
     if (this.path == "")
     {
         this.SetPropertyString("path", (string)null);
     }
     else
     {
         this.SetPropertyString("path", this.path);
     }
     this.SetPropertyString("sourceTree", FileTypeUtils.SourceTreeDesc(this.tree));
 }
Esempio n. 11
0
 public override void UpdateProps()
 {
     // The name property is set only if it is different from the path property
     SetPropertyList("children", children);
     if (name == path)
     {
         SetPropertyString("name", null);
     }
     else
     {
         SetPropertyString("name", name);
     }
     if (path == "")
     {
         SetPropertyString("path", null);
     }
     else
     {
         SetPropertyString("path", path);
     }
     SetPropertyString("sourceTree", FileTypeUtils.SourceTreeDesc(tree));
 }
Esempio n. 12
0
 public static bool IsBuildableFile(string ext)
 {
     ext = FileTypeUtils.TrimExtension(ext);
     return(!FileTypeUtils.types.ContainsKey(ext) || (uint)FileTypeUtils.types[ext].type > 0U);
 }
Esempio n. 13
0
 public static bool IsKnownExtension(string ext)
 {
     ext = FileTypeUtils.TrimExtension(ext);
     return(FileTypeUtils.types.ContainsKey(ext));
 }
Esempio n. 14
0
 public static bool IsBuildableFile(string ext)
 {
     ext = FileTypeUtils.TrimExtension(ext);
     return(!FileTypeUtils.types.ContainsKey(ext) || FileTypeUtils.types[ext].type != PBXFileType.NotBuildable);
 }