ZipEntryFile represents a file entry inside a zip file.
Inheritance: File
コード例 #1
0
        /// <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);
        }
コード例 #2
0
ファイル: Zip.cs プロジェクト: nomit007/f4
 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;
 }
コード例 #3
0
        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);
        }
コード例 #4
0
ファイル: FStore.cs プロジェクト: nomit007/f4
 /// <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;
 }