Ps2IsoTools 1.0.1
There is a newer version of this package available.
See the version list below for details.
See the version list below for details.
dotnet add package Ps2IsoTools --version 1.0.1
NuGet\Install-Package Ps2IsoTools -Version 1.0.1
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="Ps2IsoTools" Version="1.0.1" />
For projects that support PackageReference, copy this XML node into the project file to reference the package.
paket add Ps2IsoTools --version 1.0.1
The NuGet Team does not provide support for this client. Please contact its maintainers for support.
#r "nuget: Ps2IsoTools, 1.0.1"
#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 Ps2IsoTools as a Cake Addin #addin nuget:?package=Ps2IsoTools&version=1.0.1 // Install Ps2IsoTools as a Cake Tool #tool nuget:?package=Ps2IsoTools&version=1.0.1
The NuGet Team does not provide support for this client. Please contact its maintainers for support.
About
Ps2IsoTools is an ISO editor designed to work with the UDF file system, specifically for use with PS2 games. Ps2IsoTools is heavily derived from DiscUtils and includes many of its ISO, UDF, and other classes.
Meta data about files such as Creation Date and Last Modified Date are lost when building or rebuilding ISOs.
How to Use
Reading a UDF format ISO with UdfReader
using (var reader = new UdfReader("path-to-local-iso.iso"))
{
// Get list of all files
List<string> fullNames = reader.GetAllFileFullNames();
// FileIdentifiers are used to reference files on the ISO
FileIdentifier? fileId = reader.GetFileByName("file-name");
if (fileId is not null)
{
// Read data from file
using (BinaryReader br = new(reader.GetFileStream(fileId)))
{
Console.WriteLine(br.ReadString());
}
// Copy file from the ISO to your local drive
reader.CopyFile(fileId, "path-to-copy-to");
}
}
Building a UDF format ISO with UdfBuilder
var builder = new UdfBuilder();
builder.VolumeIdentifier = "volume-identifier";
// Add file via byte array
builder.AddFile("text.txt", Encoding.ASCII.GetBytes("Text file text"));
// Add directory
builder.AddDirectory("directory");
// Add file from local drive
builder.AddFile(@"directory\file.bin", "path-to-local-file");
// Add file from Stream
// Has optional bool parameter to make a copy of the Stream in RAM (default: false)
// so that it is safe to close before calling Build()
using (FileStream fs = File.Open("path-to-local-file", FileMode.Open))
{
builder.AddFile(@"directory\streams\file.dat", fs, true);
}
builder.Build("path-to-output-iso.iso");
Editing a UDF format ISO with UdfEditor
// Has string optional parameter to copy the ISO immediataely so that the original is preserved
using (var editor = new UdfEditor("path-to-local-iso.iso", "optional-path-to-copy-to.iso"))
{
var fileId = editor.GetFileByName("file-name");
if (fileId is not null)
{
// Write directly to a specific file on the ISO
// Does not require Rebuild()
using (BinaryWriter bw = new(editor.GetFileStream(fileId)))
{
var data = new byte[] { 0xFF, 0xFF };
bw.Write(data);
}
// Replace a file entirely
// Has optional bool parameter to make a copy of the Stream in RAM (default: false)
// ISO must be rebuilt with Rebuild() to save changes
// Does not edit file name, only contents
using (FileStream fs = File.Open("path-to-local-file", FileMode.Open))
{
editor.ReplaceFileStream(fileId, fs, true);
}
// Remove a file from the ISO
// Requires Rebuild()
editor.RemoveFile(fileId);
// Add a file, same as UdfBuilder
// Requires Rebuild()
editor.AddFile("Text.txt", Encoding.ASCII.GetBytes("Text file text"));
// Add a directory, same as UdfBuilder
// Requires Rebuild()
editor.AddDirectory(@"NewDirectory\DATA");
}
// Rebuild the ISO (Creates entirely new meta data using UdfBuilder)
// Optional string parameter to output a new ISO file
// Overwriting the current ISO will temporarily cause a spike in RAM usage ~2x total ISO size
// as all of the files will be stored in MemoryStreams during the process
editor.Rebuild("optional-path-to-build.iso");
}
Product | Versions Compatible and additional computed target framework versions. |
---|---|
.NET | net6.0 is compatible. net6.0-android was computed. net6.0-ios was computed. net6.0-maccatalyst was computed. net6.0-macos was computed. net6.0-tvos was computed. net6.0-windows was computed. net7.0 was computed. net7.0-android was computed. net7.0-ios was computed. net7.0-maccatalyst was computed. net7.0-macos was computed. net7.0-tvos was computed. net7.0-windows was computed. net8.0 was computed. net8.0-android was computed. net8.0-browser was computed. net8.0-ios was computed. net8.0-maccatalyst was computed. net8.0-macos was computed. net8.0-tvos was computed. net8.0-windows was computed. |
Compatible target framework(s)
Included target framework(s) (in package)
Learn more about Target Frameworks and .NET Standard.
-
net6.0
- 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.
Added description and icon