mirror of
https://github.com/space-wizards/RobustToolbox.git
synced 2026-09-16 15:22:27 +02:00
commitd4f265c314Author: PJB3005 <pieterjan.briers+git@gmail.com> Date: Sun Sep 14 14:32:44 2025 +0200 Fix incorrect path combine in DirLoader and WritableDirProvider This (and the other couple past commits) reported by Elelzedel. commit7654d38612Author: PJB3005 <pieterjan.briers+git@gmail.com> Date: Sat Sep 13 22:50:51 2025 +0200 Move CEF cache out of data directory Don't want content messing with this... commitcdcc255123Author: PJB3005 <pieterjan.briers+git@gmail.com> Date: Sat Sep 13 19:11:16 2025 +0200 Make Robust.Client.WebView.Cef.Program internal. commit2f56a6a110Author: PJB3005 <pieterjan.briers+git@gmail.com> Date: Sat Sep 13 19:10:46 2025 +0200 Update SpaceWizards.NFluidSynth to 0.2.2 commit16fc48cef2Author: PJB3005 <pieterjan.briers+git@gmail.com> Date: Sat Sep 13 19:09:43 2025 +0200 Hide IWritableDirProvider.RootDir on client This shouldn't be exposed. (cherry picked from commit 2f07159336bc640e41fbbccfdec4133a68c13bdb) (cherry picked from commit d6c3212c74373ed2420cc4be2cf10fcd899c2106) (cherry picked from commit bfa70d7e2ca6758901b680547fcfa9b24e0610b7) (cherry picked from commit 06e52f5d58efc1491915822c2650f922673c82c6)
74 lines
3.5 KiB
C#
74 lines
3.5 KiB
C#
using System;
|
|
using System.Diagnostics.CodeAnalysis;
|
|
using System.IO;
|
|
using Robust.Shared.Utility;
|
|
|
|
namespace Robust.Shared.ContentPack
|
|
{
|
|
internal interface IResourceManagerInternal : IResourceManager
|
|
{
|
|
/// <summary>
|
|
/// Sets the manager up so that the base game can run.
|
|
/// </summary>
|
|
/// <param name="userData">
|
|
/// The directory to use for user data.
|
|
/// If null, a virtual temporary file system is used instead.
|
|
/// </param>
|
|
/// <param name="hideUserDataDir">
|
|
/// If true, <see cref="IWritableDirProvider.RootDir"/> will be hidden on
|
|
/// <see cref="IResourceManager.UserData"/>.
|
|
/// </param>
|
|
void Initialize(string? userData, bool hideUserDataDir);
|
|
|
|
/// <summary>
|
|
/// Mounts a single stream as a content file. Useful for unit testing.
|
|
/// </summary>
|
|
/// <param name="stream">The stream to mount.</param>
|
|
/// <param name="path">The path that the file will be mounted at.</param>
|
|
void MountStreamAt(MemoryStream stream, ResPath path);
|
|
|
|
/// <summary>
|
|
/// Loads the default content pack from the configuration file into the VFS.
|
|
/// </summary>
|
|
void MountDefaultContentPack();
|
|
|
|
/// <summary>
|
|
/// Loads a content pack from disk into the VFS. The path is relative to
|
|
/// the executable location on disk.
|
|
/// </summary>
|
|
/// <param name="pack">The path of the pack to load on disk.</param>
|
|
/// <param name="prefix">The resource path to which all files in the pack will be relative to in the VFS.</param>
|
|
/// <exception cref="FileNotFoundException">Thrown if <paramref name="pack"/> does not exist on disk.</exception>
|
|
/// <exception cref="ArgumentException">Thrown if <paramref name="prefix"/> is not rooted.</exception>
|
|
/// <exception cref="ArgumentNullException">Thrown if <paramref name="pack"/> is null.</exception>
|
|
void MountContentPack(string pack, ResPath? prefix = null);
|
|
|
|
void MountContentPack(Stream zipStream, ResPath? prefix = null);
|
|
|
|
/// <summary>
|
|
/// Adds a directory to search inside of to the VFS. The directory is relative to
|
|
/// the executable location on disk.
|
|
/// </summary>
|
|
/// <param name="path">The path of the directory to add to the VFS on disk.</param>
|
|
/// <param name="prefix">The resource path to which all files in the directory will be relative to in the VFS.</param>
|
|
/// <exception cref="DirectoryNotFoundException">Thrown if <paramref name="path"/> does not exist on disk.</exception>
|
|
/// <exception cref="ArgumentException">Thrown if <paramref name="prefix"/> passed is not rooted.</exception>
|
|
/// <exception cref="ArgumentNullException">Thrown if <paramref name="path"/> is null.</exception>
|
|
void MountContentDirectory(string path, ResPath? prefix = null);
|
|
|
|
/// <summary>
|
|
/// Attempts to get an on-disk path absolute file path for the specified resource path.
|
|
/// </summary>
|
|
/// <remarks>
|
|
/// <para>
|
|
/// This only works if the resource is mounted as a direct directory,
|
|
/// so this obviously fails if the resource is mounted in another way such as a zip file.
|
|
/// </para>
|
|
/// <para>
|
|
/// This can be used for optimizations such as assembly loading, where an on-disk path is better.
|
|
/// </para>
|
|
/// </remarks>
|
|
bool TryGetDiskFilePath(ResPath path, [NotNullWhen(true)] out string? diskPath);
|
|
}
|
|
}
|