private void Init() { if (FullFileName != null) { Ext = FullFileName.Substring(FullFileName.LastIndexOf('.')); } }
public override string ToString() { int start = FullFileName.IndexOf(@"\", FullFileName.Length - 23); string fileName = FullFileName.Substring(start); return(String.Format("{0}, {1}", fileName, LastAccess)); }
public AndroidLibInfo(string fullPath) { FullPath = fullPath; FullFileName = Path.GetFileName(fullPath); // TODO: find a better way to extract base file name // Mapbox telemetry lib uses different naming that other android libs // <name>-<major>.<minor>.<patch> vs. <name>-<major>-<minor>-<patch> // okio-1.13.0, support-v4-25.1.0 vs. mapbox-android-telemetry-2-1-0 BaseFileName = FullFileName.Substring(0, FullFileName.LastIndexOf("-")); AssetPath = fullPath.Replace(Application.dataPath.Replace("Assets", ""), ""); }
/// <summary> /// Obtiene el nombre de archivo relativo al proyecto /// </summary> public string GetRelativeFileNameToProject() { ProjectModel project = SearchProject(); // Si existe el proyecto obtiene el nombre relativo if (project == null) { return(FullFileName.Substring(project.PathBase.Length + 1)); } else { return(FullFileName); } }