コード例 #1
0
        public PackedArchiveFileCollection(PackedArchive archive, PackedArchiveDirectory owner)
        {
            this.archive = archive;
            this.owner   = owner;

            internalList = new List <PackedArchiveFile>();
        }
コード例 #2
0
        public PackedArchiveFile(PackedArchive archive, PackedArchiveDirectory parent, string name)
        {
            Archive = archive;
            Parent  = parent;

            Name     = name;
            FullName = MakeFullName(parent, name);

            int dotIndex = name.LastIndexOf('.');

            Extension = dotIndex != -1
                                ? name.Substring(dotIndex)
                                : "";
        }
コード例 #3
0
        internal PackedArchiveDirectory(PackedArchive archive, PackedArchiveDirectory parent, string name)
        {
            Archive = archive;
            Parent  = parent;

            Directories = new PackedArchiveDirectoryCollection(archive, this);
            Files       = new PackedArchiveFileCollection(archive, this);

            if (parent != null)
            {
                Name     = name;
                FullName = MakeFullName(parent, name);
            }
        }