A module for accessing the content in a CPK file.
More...
Inherits CriDisposable.
A module for accessing the content in a CPK file.
- Description:
- CriFsBinder (binder) is a database module to handle files efficiently.
By binding the CPK file or directory to the binder, the content information in the CPK file or directory can be acquired.
A value that indicates the status of the binder.
- See also
- CriFsBinder::GetStatus
Enumerator |
---|
None |
Stopped
|
Analyze |
Binding in progress
|
Complete |
Binding completed
|
Unbind |
Unbinding in progress
|
Removed |
Unbinding complete
|
Invalid |
Binding disabled
|
Error |
Binding failed
|
override void Dispose |
( |
| ) |
|
|
inline |
Discard the binder.
- Note:
- If you discard the binder during the binding process or discard the binder without performing the Unbind process, the process may be blocked in this function for a long time.
Binds the CPK file.
- Parameters
-
srcBinder | A binder to access the CPK file to bind |
path | Path name of the CPK file to bind |
- Returns
- Bind ID
- Description:
- To use the CPK file, you need to bind the CPK file.
This function binds the CPK file to the binder and returns the bind ID.
For srcBinder, specify the binder to search for the CPK file.
If srcBinder is set to null, the default device is used.
If the bind cannot be started, 0 is returned as the bind ID.
If a value other than 0 is returned as the bind ID, internal resources are allocated.
So be sure to unbind the bind ID that is no longer required.
(The CPK file being bound is kept open.)
This function returns immediately.
Immediately after returning from this function, CPK binding is not completed yet, so you cannot access the CPK content file.
CPK will be available after the bound state becomes Complete.
You can get the binding status using the CriWare.CriFsBinder::GetStatus function.
- See also
- CriFsBinder::GetStatus, CriFsBinder::Unbind
uint BindDirectory |
( |
CriFsBinder |
srcBinder, |
|
|
string |
path |
|
) |
| |
|
inline |
Binds the directory path.
- Parameters
-
srcBinder | The binder to access the directory to be bound |
path | Path name of the directory to be bound |
- Description:
- Binds the directory pathname.
Specify the directory name to bind with an absolute path.
The system does not check whether the directory exists at the time of binding.
Only the directory path is retained in the binder; it does not open the files in the specified directory.
Therefore, unless the bind fails, the bind status of the bind ID is Complete when this function returns.
If the bind cannot be started, 0 is returned as the bind ID.
If a value other than 0 is returned as the bind ID, internal resources are allocated.
So be sure to unbind the bind ID that is no longer required.
- Note:
- This function is a debug function for development support.
If you use this function, the following problems may occur.
- Note:
- Be careful not to use this function in the application when final release.
(Convert the data in the directory to a CPK file and bind it using the CriWare.CriFsBinder::BindCpk function, or bind all the files in the directory using the CriWare.CriFsBinder::BindFile function.)
- See also
- CriFsBinder::GetStatus, CriFsBinder::Unbind, CriFsBinder::BindCpk, CriFsBinder::BindFile
Binds the file.
- Parameters
-
srcBinder | The binder to access the file to be bound |
path | The path name of the file to be bound |
- Returns
- Bind ID
- Description:
- Binds a file and returns the bind ID.
(Searches and finds the file specified by path from the binder srcBinder.)
If srcBinder is set to null, the default device is used.
If the bind cannot be started, 0 is returned as the bind ID.
If a value other than 0 is returned as the bind ID, internal resources are allocated.
So be sure to unbind the bind ID that is no longer required.
(The CPK file being bound is kept open.)
This function returns immediately.
Immediately after returning from this function, file binding is not completed yet, so you cannot access the files using the bind ID.
The files will be available after the bound status of the bind ID becomes Complete.
You can get the binding status using the CriWare.CriFsBinder::GetStatus function.
- See also
- CriFsBinder::GetStatus, CriFsBinder::Unbind
uint BindFileSection |
( |
CriFsBinder |
srcBinder, |
|
|
string |
path, |
|
|
ulong |
offset, |
|
|
int |
size, |
|
|
string |
sectionName |
|
) |
| |
|
inline |
Bind a part of the file so that the part can be treated as a virtual file.
- Parameters
-
srcBinder | The binder to access the file to be bound |
path | The path name of the file to be bound |
offset | Data start position (bytes) |
size | Data size (bytes) |
sectionName | Section name |
- Returns
- Bind ID
- Description:
- Binds a part of the file and returns the bind ID.
(Searches and finds the file specified by path from the binder srcBinder.)
If srcBinder is set to null, the default device is used.
If the bind cannot be started, 0 is returned as the bind ID.
If a value other than 0 is returned as the bind ID, internal resources are allocated.
So be sure to unbind the bind ID that is no longer required.
(The CPK file being bound is kept open.)
(Specify the section name in the path when loading.)
This function returns immediately.
Immediately after returning from this function, file binding is not completed yet, so you cannot access the files using the bind ID.
The files will be available after the bound status of the bind ID becomes Complete.
You can get the binding status using the CriWare.CriFsBinder::GetStatus function.
- See also
- CriFsBinder::GetStatus, CriFsBinder::Unbind
static void Unbind |
( |
uint |
bindId | ) |
|
|
inlinestatic |
Unbinds the bound content.
- Parameters
-
- Description:
- Unbind the bound content.
Specify which content to unbind in the bind ID.
- Note:
- This function is a return-on-complete function.
It closes files as necessary, so it may take several milliseconds depending on the execution environment.
Other bind IDs that depend on the bind ID to be unbound are also unbound at the same time (implicit unbinding).
For example, the bind IDs that are binding the content files of the CPK bind ID are unbound implicitly when the referencing CPK bind ID is unbound.
- See also
- CriWare.CriFsBinder::BindCpk, CriFsBinder::BindFile
static Status GetStatus |
( |
uint |
bindId | ) |
|
|
inlinestatic |
long GetFileSize |
( |
string |
path | ) |
|
|
inline |
Gets the file size.
- Parameters
-
path | Full path of the file |
- Returns
- File size
- Description:
- Gets the file size of the specified file.
Bind IDs whose binding status is Complete are searched.
If the specified file does not exist, a negative value is returned.
- Note:
- If directories are bound by the CriWare.CriFsBinder::BindDirectory function, processing may be blocked for a long time within this function.
- See also
- CriFsBinder::GetFileSize(int)
long GetFileSize |
( |
int |
id | ) |
|
|
inline |
Gets the file size.
- Parameters
-
- Returns
- File size
- Description:
- Gets the file size.
The CPK file with ID information needs to be bound.
Bind IDs whose binding status is Complete are searched.
If the specified file does not exist, a negative value is returned.
- See also
- CriFsBinder::GetFileSize(string)
Gets the CPK content file information.
- Parameters
-
path | Full path of the file |
info | Content file information |
- Returns
- Whether the acquisition succeeded
- Description:
- Gets the information on the file with the specified file name from the CPK file with ID+ file name information.
The CPK that contains the specified file must be the CPK with ID+ file name information.
If there are multiple files with the same name in the specified binder handle, the CPK containing the first file found will be selected.
- See also
- CriFsBinder::GetContentsFileInfo(int, out ContentsFileInfo)
Gets the CPK content file information.
- Parameters
-
id | File ID |
info | Content file information |
- Returns
- Whether the acquisition succeeded
- Description:
- Gets the information on the file with the specified file ID from the CPK file with ID+ file name information.
The CPK that contains the specified file must be the CPK with ID+ file name information.
If there are multiple files with the same ID in the specified binder handle, the CPK containing the first file found will be selected.
- See also
- CriFsBinder::GetContentsFileInfo(string, out ContentsFileInfo)
static bool GetContentsFileInfoByIndex |
( |
uint |
bindId, |
|
|
int |
index, |
|
|
int |
numFiles, |
|
|
out ContentsFileInfo[] |
info |
|
) |
| |
|
inlinestatic |
Gets the CPK content file information.
- Parameters
-
bindId | Bind ID |
index | Start index of the content file from which information is obtained |
numFiles | The number of content files from which information is obtained |
info | Content file information array |
- Returns
- Whether the acquisition succeeded
- Description:
- Gets the information for the specified number of files from the specified index from the CPK file with ID+ file name information.
The index is assigned starting from 0 to the content file when creating the CPK.
The maximum value that can be specified for index and numFiles is the total number of files that can be acquired using CriWare.CriFsBinder::GetNumContentsFiles .
- See also
- CriFsBinder::GetContentsFileInfo(string, out ContentsFileInfo), CriFsBinder::GetNumContentsFiles
static int GetNumContentsFiles |
( |
uint |
bindId | ) |
|
|
inlinestatic |
Gets the total number of CPK content files.
- Parameters
-
- Returns
- The number of content files
- Description:
- Gets the total number of included files from the CPK file with ID+ file name information.
The return value of this function is the maximum number of content files for obtaining information that can be specified in the CriWare.CriFsBinder::GetContentsFileInfoByIndex function for the same bind ID.
- See also
- CriFsBinder::GetContentsFileInfoByIndex
static void SetPriority |
( |
uint |
bindId, |
|
|
int |
priority |
|
) |
| |
|
inlinestatic |
Sets the search priority for a bind ID.
- Parameters
-
bindId | Bind ID |
priority | Priority |
- Description:
- Sets the search priority in the binder for the bind ID.
The lowest priority is 0, and the higher the value, the higher the search priority.
For bind IDs with the same priority, the one bound first is found first.
If no priority is set, the default priority is 0.
Bind IDs whose binding status is Complete are searched.
The documentation for this class was generated from the following file: