{"id":19992452,"url":"https://github.com/DiscUtils/DiscUtils","last_synced_at":"2025-05-04T11:31:15.628Z","repository":{"id":40331751,"uuid":"72153857","full_name":"DiscUtils/DiscUtils","owner":"DiscUtils","description":"Utility libraries to interact with discs, filesystem formats and more","archived":false,"fork":false,"pushed_at":"2024-02-26T23:14:26.000Z","size":15857,"stargazers_count":793,"open_issues_count":131,"forks_count":186,"subscribers_count":34,"default_branch":"develop","last_synced_at":"2025-04-26T04:12:19.443Z","etag":null,"topics":["disk","fat","fat32","filesystem","iso","ntfs","vhd","vmdk","xva"],"latest_commit_sha":null,"homepage":"","language":"C#","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/DiscUtils.png","metadata":{"files":{"readme":"README.md","changelog":"Changelog.txt","contributing":null,"funding":null,"license":"LICENSE.txt","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2016-10-27T22:37:58.000Z","updated_at":"2025-04-16T10:55:22.000Z","dependencies_parsed_at":"2024-06-18T12:29:00.054Z","dependency_job_id":"c09ae7b6-9670-46c4-a98f-982d5e65b0d5","html_url":"https://github.com/DiscUtils/DiscUtils","commit_stats":{"total_commits":1263,"total_committers":24,"mean_commits":52.625,"dds":"0.31908155186064924","last_synced_commit":"59d7cadab839c6d8dfcf52f8be5efe6d2ced190f"},"previous_names":[],"tags_count":11,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/DiscUtils%2FDiscUtils","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/DiscUtils%2FDiscUtils/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/DiscUtils%2FDiscUtils/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/DiscUtils%2FDiscUtils/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/DiscUtils","download_url":"https://codeload.github.com/DiscUtils/DiscUtils/tar.gz/refs/heads/develop","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":252329370,"owners_count":21730599,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["disk","fat","fat32","filesystem","iso","ntfs","vhd","vmdk","xva"],"created_at":"2024-11-13T04:52:10.576Z","updated_at":"2025-05-04T11:31:10.620Z","avatar_url":"https://github.com/DiscUtils.png","language":"C#","readme":"\n# Project Description\n\n[![Build status](https://ci.appveyor.com/api/projects/status/020ddq6h1phbiyqe?svg=true)](https://ci.appveyor.com/project/LordMike/discutils)\n\nDiscUtils is a .NET library to read and write ISO files and Virtual Machine disk files (VHD, VDI, XVA, VMDK, etc). DiscUtils is developed in C# with no native code (or P/Invoke).\n\nImplementation of the ISO, UDF, FAT and NTFS file systems is now fairly stable. VHD, XVA, VMDK and VDI disk formats are implemented, as well as read/write Registry support. The library also includes a simple iSCSI initiator, for accessing disks via iSCSI and an NFS client implementation.\n\nNote: this is a fork of https://github.com/quamotion/DiscUtils, which itself is a fork of https://discutils.codeplex.com/. \n\n### Wiki\n\nSee more up to date documentation at the [Wiki](https://github.com/DiscUtils/DiscUtils/wiki)\n\n### Implementation in this repository\n\nThis repository has performed a few changes to the core DiscUtils library. For starters, all projects have been converted to .NET Core, and are targeting .NET 2.0 through 5.0, in addition to .NET Standard 2.0 (thanks [Quamotion](https://github.com/Quamotion)). \n\nThe DiscUtils library has been split into 25 independent projects, which can function without the others present. This reduces the \"cost\" of having DiscUtils immensely, as we're down from the 1 MB binary it used to be.\n\nTo work with this, four Meta packages have been created:\n\n* DiscUtils.Complete: Everything, like before\n* DiscUtils.Containers: such as VMDK, VHD, VHDX\n* DiscUtils.FileSystems: such as NTFS, FAT, EXT\n* DiscUtils.Transports: such as NFS\n\n#### Note on detections\n\nDiscUtils has a number of detection helpers. These provide services like \"which filesystem is this stream?\". For this to work, you must register your filesystem providers with the DiscUtils core. To do this, call:\n\n    DiscUtils.Setup.RegisterAssembly(assembly);\n\nWhere `assembly` is the assembly you wish to register. Note that the metapackages have helpers:\n\n```csharp\nSetupHelper.SetupComplete(); // From DiscUtils.Complete\nSetupHelper.SetupContainers(); // From DiscUtils.Containers\nSetupHelper.SetupFileSystems(); // From DiscUtils.FileSystems\nSetupHelper.SetupTransports(); // From DiscUtils.Transports\n```\n\n## How to use the Library\n\nHere's a few really simple examples.\n\n### How to create a new ISO:\n\n```csharp\nCDBuilder builder = new CDBuilder();\nbuilder.UseJoliet = true;\nbuilder.VolumeIdentifier = \"A_SAMPLE_DISK\";\nbuilder.AddFile(@\"Folder\\Hello.txt\", Encoding.ASCII.GetBytes(\"Hello World!\"));\nbuilder.Build(@\"C:\\temp\\sample.iso\");\n``` \n\nYou can add files as byte arrays (shown above), as files from the Windows filesystem, or as a Stream. By using a different form of Build, you can get a Stream to the ISO file, rather than writing it to the Windows filesystem.\n\n\n### How to extract a file from an ISO:\n\n```csharp\nusing (FileStream isoStream = File.Open(@\"C:\\temp\\sample.iso\"))\n{\n  CDReader cd = new CDReader(isoStream, true);\n  Stream fileStream = cd.OpenFile(@\"Folder\\Hello.txt\", FileMode.Open);\n  // Use fileStream...\n}\n``` \n\nYou can also browse through the directory hierarchy, starting at cd.Root.\n\n### How to create a virtual hard disk:\n\n```csharp\nlong diskSize = 30 * 1024 * 1024; //30MB\nusing (Stream vhdStream = File.Create(@\"C:\\TEMP\\mydisk.vhd\"))\n{\n    Disk disk = Disk.InitializeDynamic(vhdStream, diskSize);\n    BiosPartitionTable.Initialize(disk, WellKnownPartitionType.WindowsFat);\n    using (FatFileSystem fs = FatFileSystem.FormatPartition(disk, 0, null))\n    {\n        fs.CreateDirectory(@\"TestDir\\CHILD\");\n        // do other things with the file system...\n    }\n}\n``` \n\nAs with ISOs, you can browse the file system, starting at fs.Root.\n\n\n### How to create a virtual floppy disk:\n\n```csharp\nusing (FileStream fs = File.Create(@\"myfloppy.vfd\"))\n{\n    using (FatFileSystem floppy = FatFileSystem.FormatFloppy(fs, FloppyDiskType.HighDensity, \"MY FLOPPY  \"))\n    {\n        using (Stream s = floppy.OpenFile(\"foo.txt\", FileMode.Create))\n        {\n            // Use stream...\n        }\n    }\n}\n``` \n\nAgain, start browsing the file system at floppy.Root.\n\n## Development releases\n\nAutomated CI builds are available on Myget. Add this source to your nuget configuration:\n\n\u003e https://www.myget.org/F/discutils/api/v3/index.json \n\n.. or add this to a `NuGet.Config` file (Casing important on linux), in your repository:\n\n```xml\n\u003c?xml version=\"1.0\" encoding=\"utf-8\"?\u003e\n\u003cconfiguration\u003e\n  \u003cpackageSources\u003e\n    \u003cadd key=\"DiscUtils\" value=\"https://www.myget.org/F/discutils/api/v3/index.json\" /\u003e\n  \u003c/packageSources\u003e\n\u003c/configuration\u003e\n```","funding_links":[],"categories":["C\\#"],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2FDiscUtils%2FDiscUtils","html_url":"https://awesome.ecosyste.ms/projects/github.com%2FDiscUtils%2FDiscUtils","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2FDiscUtils%2FDiscUtils/lists"}