/// <summary> /// Return a map to use for Pod.files() /// </summary> public List podFiles(Fan.Sys.Uri podUri) { List list = new List(Sys.FileType); IEnumerator en = zipFile.GetEnumerator(); while (en.MoveNext()) { ZipEntry entry = (ZipEntry)en.Current; string name = entry.Name; if (name.EndsWith(".fcode")) { continue; } if (name.EndsWith(".class")) { continue; } if (name.EndsWith(".def") && !name.Contains("/")) { continue; } Fan.Sys.Uri uri = Fan.Sys.Uri.fromStr(podUri + "/" + LocalFile.fileNameToUriName(entry.Name)); Fan.Sys.ZipEntryFile file = new Fan.Sys.ZipEntryFile(zipFile, entry, uri); list.add(file); } return(list); }
public static Map contents(ZipFile zipFile) { Map c = new Map(Sys.UriType, Sys.FileType); IEnumerator e = zipFile.GetEnumerator(); while (e.MoveNext()) { ZipEntry entry = (ZipEntry)e.Current; ZipEntryFile f = new ZipEntryFile(zipFile, entry); c.set(f.m_uri, f); } return c; }
public static Map contents(ZipFile zipFile) { Map c = new Map(Sys.UriType, Sys.FileType); IEnumerator e = zipFile.GetEnumerator(); while (e.MoveNext()) { ZipEntry entry = (ZipEntry)e.Current; ZipEntryFile f = new ZipEntryFile(zipFile, entry); c.set(f.m_uri, f); } return(c); }
/// <summary> /// Return a map to use for Pod.files() /// </summary> public List podFiles(Fan.Sys.Uri podUri) { List list = new List(Sys.FileType); IEnumerator en = zipFile.GetEnumerator(); while (en.MoveNext()) { ZipEntry entry = (ZipEntry)en.Current; string name = entry.Name; if (name.EndsWith(".fcode")) continue; if (name.EndsWith(".class")) continue; if (name.EndsWith(".def") && !name.Contains("/")) continue; Fan.Sys.Uri uri = Fan.Sys.Uri.fromStr(podUri + "/" + LocalFile.fileNameToUriName(entry.Name)); Fan.Sys.ZipEntryFile file = new Fan.Sys.ZipEntryFile(zipFile, entry, uri); list.add(file); } return list; }