libXFile 1.0.0

There is a newer version of this package available.
See the version list below for details.
dotnet add package libXFile --version 1.0.0
NuGet\Install-Package libXFile -Version 1.0.0
This command is intended to be used within the Package Manager Console in Visual Studio, as it uses the NuGet module's version of Install-Package.
<PackageReference Include="libXFile" Version="1.0.0" />
For projects that support PackageReference, copy this XML node into the project file to reference the package.
paket add libXFile --version 1.0.0
#r "nuget: libXFile, 1.0.0"
#r directive can be used in F# Interactive and Polyglot Notebooks. Copy this into the interactive tool or source code of the script to reference the package.
// 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 Compatible and additional computed target framework versions.
.NET Framework net48 is compatible.  net481 was computed. 
Compatible target framework(s)
Included target framework(s) (in package)
Learn more about Target Frameworks and .NET Standard.
  • .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.

Version Downloads Last updated
2.0.0 123 10/12/2023
1.0.0 123 9/23/2023

First Release