Example #1
0
 public RootContentDirectory(AssetBundle newAssetBundle, string newName) : base(newName, null)
 {
     this.assetBundle = newAssetBundle;
     string[] allAssetNames = this.assetBundle.GetAllAssetNames();
     for (int i = 0; i < allAssetNames.Length; i++)
     {
         ContentDirectory contentDirectory = this;
         string[]         array            = allAssetNames[i].Split(new char[]
         {
             '/'
         });
         for (int j = 0; j < array.Length; j++)
         {
             if (j == array.Length - 1)
             {
                 string newFile = array[j];
                 contentDirectory.files.Add(new ContentFile(this, contentDirectory, allAssetNames[i], newFile));
             }
             else
             {
                 string           text = array[j];
                 ContentDirectory contentDirectory2;
                 if (!contentDirectory.directories.TryGetValue(text, out contentDirectory2))
                 {
                     contentDirectory2 = new ContentDirectory(text, contentDirectory);
                     contentDirectory.directories.Add(text, contentDirectory2);
                 }
                 contentDirectory = contentDirectory2;
             }
         }
     }
 }
Example #2
0
 public ContentDirectory(string newName, ContentDirectory newParent)
 {
     this.name        = newName;
     this.parent      = newParent;
     this.files       = new List <ContentFile>();
     this.directories = new Dictionary <string, ContentDirectory>();
 }
Example #3
0
 // Token: 0x06001985 RID: 6533 RVA: 0x000906E8 File Offset: 0x0008EAE8
 public ContentFile(RootContentDirectory newRootDirectory, ContentDirectory newDirectory, string newPath, string newFile)
 {
     this.rootDirectory = newRootDirectory;
     this.directory     = newDirectory;
     this.path          = newPath;
     this.file          = newFile;
     this.name          = Path.GetFileNameWithoutExtension(this.file);
     this.guessedType   = ContentTypeGuesserRegistry.guess(Path.GetExtension(this.file));
 }