LeviLamina
Loading...
Searching...
No Matches
FlatFileSystemImpl.h
1#pragma once
2
3#include "mc/_HeaderOutputPredefine.h"
4
5// auto generated inclusion list
6#include "mc/deps/core/file/DirectoryIterationFlags.h"
7#include "mc/deps/core/file/FileBufferingMode.h"
8#include "mc/deps/core/file/PathBuffer.h"
9#include "mc/platform/brstd/function_ref.h"
10
11// auto generated forward declare list
12// clang-format off
13namespace Core { class FileImpl; }
14namespace Core { class FileOpenMode; }
15namespace Core { class FileSystemImpl; }
16namespace Core { class FlatFileManifestTracker; }
17namespace Core { class FlatFileSearchResult; }
18namespace Core { class PathView; }
19namespace Core { class Result; }
20namespace Core { struct DirectoryIterationItem; }
21namespace Core { struct ExcludedPath; }
22// clang-format on
23
24namespace Core {
25
26class FlatFileSystemImpl {
27public:
28 // member variables
29 // NOLINTBEGIN
32 // NOLINTEND
33
34public:
35 // prevent constructor by default
36 FlatFileSystemImpl& operator=(FlatFileSystemImpl const&);
37 FlatFileSystemImpl(FlatFileSystemImpl const&);
38 FlatFileSystemImpl();
39
40public:
41 // member functions
42 // NOLINTBEGIN
44 ::Core::FileSystemImpl& fileSystemImplementation,
45 ::std::shared_ptr<::Core::FlatFileManifestTracker> manifestTracker
46 );
47
48 MCNAPI ::Core::FlatFileSearchResult
49 _findFileOrDirectoryEntry(::Core::PathView filePath, ::Core::PathView manifestPath, bool skipDeleted);
50
51 MCNAPI ::Core::Result _getSeekPositionAndSize(
52 ::Core::PathView filePath,
53 ::Core::PathView manifestPath,
54 uint64& seekPositionOut,
55 uint64& fileSizeOut
56 );
57
58 MCNAPI ::Core::Result copyFlatFile(
59 ::Core::PathView sourceDirectoryPath,
60 ::Core::PathView targetDirectoryPath,
61 ::std::vector<::Core::ExcludedPath> const& excludedDirectories,
62 ::std::vector<::Core::ExcludedPath> const& excludedFiles
63 );
64
65 MCNAPI ::Core::Result createFlatFile(::Core::PathView sourceDirectoryPath, ::Core::PathView targetDirectoryPath);
66
67 MCNAPI ::Core::Result deleteFileOrDirectory(
68 ::Core::PathView fileOrDirectoryPath,
69 ::Core::PathView manifestPath,
70 bool directoryDeleteEnabled,
71 bool deleteRecursively
72 );
73
74 MCNAPI bool directoryExists(::Core::PathView directoryPath, ::Core::PathView manifestPath);
75
76 MCNAPI bool fileExists(::Core::PathView filePath, ::Core::PathView manifestPath);
77
79
80 MCNAPI ::Core::Result getFileSize(::Core::PathView filePath, ::Core::PathView manifestPath, uint64* pFileSize);
81
82 MCNAPI bool isDirectoryPathAFlatFile(::Core::PathView directoryPath);
83
84 MCNAPI ::Core::Result iterateOverDirectory(
85 ::Core::PathView directoryPath,
86 ::Core::PathView manifestPath,
87 ::Core::DirectoryIterationFlags flags,
89 );
90
91 MCNAPI ::Core::Result openFlatFile(
92 ::std::unique_ptr<::Core::FileImpl>& fileOut,
93 ::Core::PathView filePath,
94 ::Core::PathView manifestPath,
95 ::Core::FileOpenMode openMode,
96 ::Core::FileBufferingMode fileBufferingMode
97 );
98
100 ::Core::PathView path,
101 ::Core::PathBuffer<::std::string>& manifestFilePath,
102 bool shouldIncludeParentDir
103 );
104 // NOLINTEND
105
106public:
107 // constructor thunks
108 // NOLINTBEGIN
109 MCNAPI void* $ctor(
110 ::Core::FileSystemImpl& fileSystemImplementation,
111 ::std::shared_ptr<::Core::FlatFileManifestTracker> manifestTracker
112 );
113 // NOLINTEND
114};
115
116} // namespace Core
Definition FileImpl.h:19
Definition FileOpenMode.h:7
Definition FileSystemImpl.h:30
Definition FlatFileManifestTracker.h:13
Definition FlatFileSearchResult.h:7
MCAPI FlatFileSystemImpl(::Core::FileSystemImpl &fileSystemImplementation, ::std::shared_ptr<::Core::FlatFileManifestTracker > manifestTracker)
MCAPI bool isDirectoryPathAFlatFile(::Core::PathView directoryPath)
MCAPI::Core::Result _getSeekPositionAndSize(::Core::PathView filePath, ::Core::PathView manifestPath, uint64 &seekPositionOut, uint64 &fileSizeOut)
MCAPI::Core::Result deleteFileOrDirectory(::Core::PathView fileOrDirectoryPath, ::Core::PathView manifestPath, bool directoryDeleteEnabled, bool deleteRecursively)
MCAPI bool fileExists(::Core::PathView filePath, ::Core::PathView manifestPath)
MCAPI bool directoryExists(::Core::PathView directoryPath, ::Core::PathView manifestPath)
MCAPI::Core::Result createFlatFile(::Core::PathView sourceDirectoryPath, ::Core::PathView targetDirectoryPath)
MCAPI bool fileOrDirectoryExists(::Core::PathView path, ::Core::PathView manifestPath)
MCAPI::Core::Result iterateOverDirectory(::Core::PathView directoryPath, ::Core::PathView manifestPath, ::Core::DirectoryIterationFlags flags, ::brstd::function_ref<::Core::Result(::Core::DirectoryIterationItem const &)> callbackFunction)
MCAPI void * $ctor(::Core::FileSystemImpl &fileSystemImplementation, ::std::shared_ptr<::Core::FlatFileManifestTracker > manifestTracker)
MCAPI::Core::FlatFileSearchResult _findFileOrDirectoryEntry(::Core::PathView filePath, ::Core::PathView manifestPath, bool skipDeleted)
MCAPI::Core::Result openFlatFile(::std::unique_ptr<::Core::FileImpl > &fileOut, ::Core::PathView filePath, ::Core::PathView manifestPath, ::Core::FileOpenMode openMode, ::Core::FileBufferingMode fileBufferingMode)
MCAPI::Core::Result getFileSize(::Core::PathView filePath, ::Core::PathView manifestPath, uint64 *pFileSize)
MCAPI::Core::Result copyFlatFile(::Core::PathView sourceDirectoryPath, ::Core::PathView targetDirectoryPath, ::std::vector<::Core::ExcludedPath > const &excludedDirectories, ::std::vector<::Core::ExcludedPath > const &excludedFiles)
MCAPI bool shouldAccessFlatFile(::Core::PathView path, ::Core::PathBuffer<::std::string > &manifestFilePath, bool shouldIncludeParentDir)
Definition PathBuffer.h:8
Definition PathView.h:19
Definition Result.h:11
Definition function_ref.h:60
Definition DirectoryIterationItem.h:18
Definition ExcludedPath.h:10
Definition Alias.h:14