35 const std::filesystem::path &directory,
53 void SortAssets(std::vector<AssetItem> &items,
const std::string &sortBy,
bool ascending);
60 std::string
GetMimeType(
const std::string &extension);
75 bool CreateFolder(
const std::filesystem::path &parentPath,
const std::string &folderName);
84 bool CreateScript(
const std::filesystem::path &parentPath,
const std::string &scriptName,
const std::string &scriptType);
91 bool DeleteAsset(
const std::filesystem::path &assetPath);
99 bool RenameAsset(
const std::filesystem::path &oldPath,
const std::string &newName);
122 bool MatchesFilter(
const std::string &name,
const std::string &filter);
Core data structures for asset items.
A panel component responsible for managing and displaying asset resources.
Handles asset data management, file operations, and state.
Definition AssetManager.h:20
bool RenameAsset(const std::filesystem::path &oldPath, const std::string &newName)
Rename an asset.
Definition AssetManager.cpp:336
bool ShouldShowFile(const std::filesystem::path &path, const AssetBrowserState &state)
Check if a file should be displayed based on filters.
Definition AssetManager.cpp:109
void Initialize()
Initialize the asset manager.
Definition AssetManager.cpp:11
std::string GetFileCategory(const std::string &extension)
Get file category for UI purposes.
Definition AssetManager.cpp:219
std::vector< AssetItem > GetDirectoryContents(const std::filesystem::path &directory, bool isGlobal, const AssetBrowserState &state)
Get directory contents as asset items.
Definition AssetManager.cpp:16
void SortAssets(std::vector< AssetItem > &items, const std::string &sortBy, bool ascending)
Sort asset items based on criteria.
Definition AssetManager.cpp:133
std::string GetMimeType(const std::string &extension)
Get MIME type for a file.
Definition AssetManager.cpp:174
std::string GetDragData(const AssetItem &item)
Get drag data for an asset.
Definition AssetManager.cpp:360
bool CreateFolder(const std::filesystem::path &parentPath, const std::string &folderName)
Create a new folder at the specified location.
Definition AssetManager.cpp:243
bool DeleteAsset(const std::filesystem::path &assetPath)
Delete an asset.
Definition AssetManager.cpp:317
bool CanDragAsset(const AssetItem &item)
Check if an asset can be dragged.
Definition AssetManager.cpp:350
bool CreateScript(const std::filesystem::path &parentPath, const std::string &scriptName, const std::string &scriptType)
Create a new script file.
Definition AssetManager.cpp:256
Definition AssetsPanel.cpp:7
State information for the asset browser.
Definition AssetItem.h:51
Represents a single asset item in the file browser.
Definition AssetItem.h:30