mirror of
https://github.com/space-wizards/RobustToolbox.git
synced 2026-02-15 03:30:53 +01:00
* RSI WiP * More work but we're doing bsdiff now * RSI loading seems to mostly work. * Vector2u deserialization test. * Add in packages again. * This is the part where I realize I need a path manipulation library. * The start of a path class but it's late so I'm going to bed. * HIGHLY theoretical ResourcePath code. Partially tested but not really. * Allow x86 for unit tests I guess jesus christ. Thanks Microsoft for still not shipping x64 VS in 2018. * Resource paths work & are tested. * I missed a doc spot. * ResourcePaths implemented on the server. * Client works with resource paths. TIME FOR A REFACTOR. * Some work but this might be a stupid idea so I migh throw it in the trash. * Resources refactored completely. They now only get the requested resourcepath. They're in charge of opening files to load. * RSI Loader WORKS. * Update AudioResource for new loading support. * Fix package references. * Fix more references. * Gonna work now?
36 lines
1.3 KiB
C#
36 lines
1.3 KiB
C#
using SS14.Shared.Utility;
|
|
using System.Collections.Generic;
|
|
using System.IO;
|
|
|
|
namespace SS14.Shared.ContentPack
|
|
{
|
|
public partial class ResourceManager
|
|
{
|
|
/// <summary>
|
|
/// Common interface for mounting various things in the VFS.
|
|
/// </summary>
|
|
protected interface IContentRoot
|
|
{
|
|
/// <summary>
|
|
/// Initializes the content root.
|
|
/// Throws an exception if the content root failed to mount.
|
|
/// </summary>
|
|
void Mount();
|
|
|
|
/// <summary>
|
|
/// Gets a file from the content root using the relative path.
|
|
/// </summary>
|
|
/// <param name="relPath">Relative path from the root directory.</param>
|
|
/// <returns>A stream of the file loaded into memory.</returns>
|
|
bool TryGetFile(ResourcePath relPath, out MemoryStream stream);
|
|
|
|
/// <summary>
|
|
/// Recursively finds all files in a directory and all sub directories.
|
|
/// </summary>
|
|
/// <param name="path">Directory to search inside of.</param>
|
|
/// <returns>Enumeration of all relative file paths of the files found.</returns>
|
|
IEnumerable<ResourcePath> FindFiles(ResourcePath path);
|
|
}
|
|
}
|
|
}
|