mirror of
https://github.com/Atmosphere-NX/Atmosphere.git
synced 2025-06-03 08:08:39 -04:00
sysupdater: begin implementing api
This commit is contained in:
parent
fdc7ef62f7
commit
28a6bb713c
15 changed files with 362 additions and 14 deletions
|
@ -26,12 +26,18 @@ namespace ams::ncm {
|
|||
return impl::PathView(name).HasSuffix(".cnmt");
|
||||
}
|
||||
|
||||
Result MountContentMetaByRemoteFileSystemProxy(const char *mount_name, const char *path) {
|
||||
return fs::MountContent(mount_name, path, fs::ContentType_Meta);
|
||||
}
|
||||
|
||||
constinit MountContentMetaFunction g_mount_content_meta_func = MountContentMetaByRemoteFileSystemProxy;
|
||||
|
||||
}
|
||||
|
||||
Result ReadContentMetaPath(AutoBuffer *out, const char *path) {
|
||||
/* Mount the content. */
|
||||
auto mount_name = impl::CreateUniqueMountName();
|
||||
R_TRY(fs::MountContent(mount_name.str, path, fs::ContentType_Meta));
|
||||
R_TRY(g_mount_content_meta_func(mount_name.str, path));
|
||||
ON_SCOPE_EXIT { fs::Unmount(mount_name.str); };
|
||||
|
||||
/* Open the root directory. */
|
||||
|
@ -156,4 +162,8 @@ namespace ams::ncm {
|
|||
return ResultSuccess();
|
||||
}
|
||||
|
||||
void SetMountContentMetaFunction(MountContentMetaFunction func) {
|
||||
g_mount_content_meta_func = func;
|
||||
}
|
||||
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue