12#ifndef ROOT7_REveAssetDir
13#define ROOT7_REveAssetDir
19namespace Experimental {
30 static std::vector<REveAssetDir *> &
Instances();
54 std::string
Find(
const std::string &file)
const;
55 std::string
FindPair(
const std::string &file1,
const std::string &file2)
const;
56 std::string
WritePath(
const std::string &file)
const;
Directories of one kind of file the REve server serves under one http location prefix.
static std::string NormalizeDir(const std::string &dir)
Return dir with a trailing slash; an empty dir stays empty.
void SetUserDir(const std::string &dir)
Replace the user directories with dir.
void AddUserDir(const std::string &dir)
Append dir to the user directories.
REveAssetDir & operator=(const REveAssetDir &)=delete
std::vector< std::string > fUserDirs
set by the user, searched first, in order
const std::vector< std::string > & GetUserDirs() const
~REveAssetDir()
Destructor.
std::string WritePath(const std::string &file) const
Return the path to write file to, creating the write directory if it does not exist.
std::string fWriteDir
where new files are written; empty if none
REveAssetDir(const REveAssetDir &)=delete
void AddFallbackDir(const std::string &dir)
Append dir to the fallback directories.
const std::string & GetPrefix() const
Accessors; the directories passed in are normalized.
static void RegisterAll()
Register all instances. Called from the REveManager constructor.
const std::string & GetWriteDir() const
std::string fPrefix
http location prefix, such as "sdf-fonts/"
std::string Find(const std::string &file) const
Return the path of file in the first directory that has it, user directories first,...
static std::vector< REveAssetDir * > & Instances()
All existing instances, for RegisterAll().
void SetWriteDir(const std::string &dir)
REveAssetDir(const std::string &prefix)
Constructor. prefix is the http location prefix, with a trailing slash.
static std::string GetUi5Dir()
Return the directory the server maps to "rootui5sys/", found as RWebWindowsManager finds it: $ROOTUI5...
void Register() const
Pass the directories to the server, user directories first, then fallback directories,...
static std::string GetAssetsDir()
Return eve7/assets/ in the ui5 directory, where the build installs the RenderCore assets tarball.
std::string FindPair(const std::string &file1, const std::string &file2) const
Return the first directory that has file1 or file2 if it has both, else an empty string.
std::vector< std::string > fFallbackDirs
shipped with ROOT, read-only, searched after fUserDirs