summaryrefslogtreecommitdiffhomepage
path: root/Private/Source/FileManager.cxx
diff options
context:
space:
mode:
authorAmlal <amlalelmahrouss@icloud.com>2024-04-29 15:01:06 +0000
committerAmlal <amlalelmahrouss@icloud.com>2024-04-29 15:01:06 +0000
commita06c8a375f0c5f5e3613e9fe8228cebf442731ba (patch)
tree84b30c251e1b444873f4723ecab047689526e9f0 /Private/Source/FileManager.cxx
parent14f10cc0b35155ddb19ec9069ebb884246e61dcf (diff)
parenta21859d722597e4eb1216a4a48d08d8f2659b514 (diff)
Merged in MHR-18 (pull request #9)
MHR-18
Diffstat (limited to 'Private/Source/FileManager.cxx')
-rw-r--r--Private/Source/FileManager.cxx44
1 files changed, 22 insertions, 22 deletions
diff --git a/Private/Source/FileManager.cxx b/Private/Source/FileManager.cxx
index 4742769c..aab3cff0 100644
--- a/Private/Source/FileManager.cxx
+++ b/Private/Source/FileManager.cxx
@@ -47,9 +47,9 @@ bool FilesystemManagerInterface::Mount(FilesystemManagerInterface* mountPtr) {
#ifdef __FSKIT_NEWFS__
/// @brief Opens a new file.
-/// @param path
-/// @param r
-/// @return
+/// @param path
+/// @param r
+/// @return
NodePtr NewFilesystemManager::Open(const char* path, const char* r) {
if (!path || *path == 0) return nullptr;
@@ -66,14 +66,14 @@ NodePtr NewFilesystemManager::Open(const char* path, const char* r) {
}
/// @brief Writes to a catalog
-/// @param node
-/// @param data
-/// @param flags
-/// @return
+/// @param node
+/// @param data
+/// @param flags
+/// @return
Void NewFilesystemManager::Write(NodePtr node, VoidPtr data,
- Int32 flags) {
+ Int32 flags, SizeT size) {
if ((reinterpret_cast<NewCatalog*>(node))->Kind == kNewFSCatalogKindFile)
- fImpl->WriteCatalog(reinterpret_cast<NewCatalog*>(node), data);
+ fImpl->WriteCatalog(reinterpret_cast<NewCatalog*>(node), data, size);
}
/**
@@ -82,10 +82,10 @@ Void NewFilesystemManager::Write(NodePtr node, VoidPtr data,
*/
/// @brief Reads from filesystem.
-/// @param node
-/// @param flags
-/// @param sz
-/// @return
+/// @param node
+/// @param flags
+/// @param sz
+/// @return
VoidPtr NewFilesystemManager::Read(NodePtr node, Int32 flags, SizeT sz) {
if ((reinterpret_cast<NewCatalog*>(node))->Kind == kNewFSCatalogKindFile)
return fImpl->ReadCatalog(reinterpret_cast<NewCatalog*>(node), sz);
@@ -94,18 +94,18 @@ VoidPtr NewFilesystemManager::Read(NodePtr node, Int32 flags, SizeT sz) {
}
/// @brief Seek from Catalog.
-/// @param node
-/// @param off
-/// @return
+/// @param node
+/// @param off
+/// @return
bool NewFilesystemManager::Seek(NodePtr node, SizeT off) {
if (!node || off == 0) return false;
-
+
return fImpl->Seek(reinterpret_cast<NewCatalog*>(node), off);
}
/// @brief Tell where the catalog is/
-/// @param node
-/// @return
+/// @param node
+/// @return
SizeT NewFilesystemManager::Tell(NodePtr node) {
if (!node) return kNPos;
@@ -113,8 +113,8 @@ SizeT NewFilesystemManager::Tell(NodePtr node) {
}
/// @brief Rewind the catalog.
-/// @param node
-/// @return
+/// @param node
+/// @return
bool NewFilesystemManager::Rewind(NodePtr node) {
if (!node) return false;
@@ -122,7 +122,7 @@ bool NewFilesystemManager::Rewind(NodePtr node) {
}
/// @brief The filesystem implementation.
-/// @return
+/// @return
NewFSParser* NewFilesystemManager::GetImpl() noexcept { return fImpl; }
#endif // __FSKIT_NEWFS__
} // namespace NewOS