libXFile 1.0.0
See the version list below for details.
dotnet add package libXFile --version 1.0.0
NuGet\Install-Package libXFile -Version 1.0.0
<PackageReference Include="libXFile" Version="1.0.0" />
paket add libXFile --version 1.0.0
#r "nuget: libXFile, 1.0.0"
// Install libXFile as a Cake Addin #addin nuget:?package=libXFile&version=1.0.0 // Install libXFile as a Cake Tool #tool nuget:?package=libXFile&version=1.0.0
XFile Documentation
Table of Contents
- Introduction
- Methods
- HEADER_XFILE
- CheckIsXFile
- ReadAllBytes
- WriteAllBytes
- Append
Introduction
The XFile
class provides utility methods for working with XFiles. An XFile is a file format that is identified by specific header bytes. This documentation outlines the methods available in the XFile
class for working with these files.
Methods
HEADER_XFILE
public static byte[] HEADER_XFILE
{
get
{
return new byte[8] { 0x2A, 0x07, 0x0B, 0x0F, 0x5A, 0x01, 0x00, 0x08 };
}
}
The HEADER_XFILE
field contains the header bytes that identify an XFile. These bytes are used to determine if a file is an XFile.
CheckIsXFile
public static bool CheckIsXFile(string path)
The CheckIsXFile
method checks if the file at the specified path is an XFile.
Parameters:
path
(string): The path of the file to check.
Returns:
true
if the file is an XFile; otherwise,false
.
ReadAllBytes
public static byte[] ReadAllBytes(string path)
The ReadAllBytes
method reads all bytes of a file, excluding the HEADER_XFILE
.
Parameters:
path
(string): The path of the file to read.
Returns:
- An array of bytes containing the data read from the file.
Exceptions:
FileNotFoundException
: Thrown if the file is not found.
WriteAllBytes
public static byte[] ReadAllBytes(string path)
The WriteAllBytes
method writes the byte array to the file along with the HEADER_XFILE
.
Parameters:
path
(string): The file to write to.bytes
(byte[]): The bytes to write to the file.
Append
public static byte[] ReadAllBytes(string path)
The Append
method appends the byte array data to the existing XFile.
Parameters:
path
(string): The path of the file to append data to.bytes
(byte[]): The byte array containing the data to be appended.
Exceptions:
FileNotFoundException
: Thrown if the file is not found.
Product | Versions Compatible and additional computed target framework versions. |
---|---|
.NET Framework | net48 is compatible. net481 was computed. |
-
.NETFramework 4.8
- No dependencies.
NuGet packages
This package is not used by any NuGet packages.
GitHub repositories
This package is not used by any popular GitHub repositories.
First Release