67 lines
2.5 KiB
C#
67 lines
2.5 KiB
C#
using skyscraper5.Dvb.DataBroadcasting.Biop;
|
|
using skyscraper5.Skyscraper.IO.CrazycatStreamReader;
|
|
using System;
|
|
using System.Collections.Generic;
|
|
using System.IO;
|
|
using System.Text;
|
|
using System.Threading.Tasks;
|
|
using System.Xml.Linq;
|
|
using static System.Runtime.InteropServices.JavaScript.JSType;
|
|
|
|
namespace Tsubasa.IO
|
|
{
|
|
/// <summary>
|
|
/// Represents a simple interface to a virtual filesystem.
|
|
///
|
|
/// This interface is here as a memento to remember where Skyscraper originated from.
|
|
/// It was copied 1:1 from the source code of yo3explorer, a project I abandoned a long time ago, but is still dear to me.
|
|
///yo3explorer was designed to extract game assets of Yu-Gi-Oh! ONLINE 3, a long defunct online game with a fully automatic simulation of the Yu-Gi-Oh! Trading Card Game.
|
|
///The GUI of yo3explorer used this interface to talk to Archive Format parsers.
|
|
///Eventually, yo3explorer grew to not only support Yu-Gi-Oh! ONLINE 3, but other games as well.
|
|
///Some notable ones:
|
|
/// - Artificial Girl 3
|
|
/// - Ever17: The out of infinity
|
|
/// - Jokei Kazoku III ~Himitsu~
|
|
/// - Hyperdimension Neptunia Re; Birth
|
|
/// - Steins;Gate
|
|
/// - Yu-Gi-Oh! Power of Chaos
|
|
/// - Spelunky
|
|
/// - Super Heroine Chronicle
|
|
/// - Spocon! ~Sports Wear-Complex ~
|
|
///This interface is, at the time of adding this comment, over 10 years old. It was written on 24.12.2013
|
|
/// </summary>
|
|
public interface IFilesystem : IDisposable
|
|
{
|
|
|
|
/// <summary>
|
|
/// Checks whether a file by a specified name is present in a virtual filesystem.
|
|
/// </summary>
|
|
/// <param name="filename">The filename to check for.</param>
|
|
/// <returns>true if the file is present in the virtual filesystem, false if not. If filename appears in FileList this should return true.</returns>
|
|
bool FileExists(string filename);
|
|
|
|
/// <summary>
|
|
/// Returns the contents of a file in a virtual filesystem.
|
|
/// </summary>
|
|
/// <param name="filename">The filename of the file you want the contents of.</param>
|
|
/// <returns>The file contents as a byte array.</returns>
|
|
byte[] GetFile(string filename);
|
|
|
|
/// <summary>
|
|
/// All the names of the files contained in this virtual filesystem.
|
|
/// </summary>
|
|
string[] FileList
|
|
{
|
|
get;
|
|
}
|
|
|
|
/// <summary>
|
|
/// A human readable name for this virutal filesystem.
|
|
/// </summary>
|
|
string FilesystemName
|
|
{
|
|
get;
|
|
}
|
|
}
|
|
|
|
} |