{"id":19880639,"url":"https://github.com/emzi0767/managed-ntfs-data-streams","last_synced_at":"2025-05-02T13:32:20.190Z","repository":{"id":124526455,"uuid":"281435002","full_name":"Emzi0767/Managed-NTFS-Data-Streams","owner":"Emzi0767","description":"A quick and somewhat dirty wrapper for NTFS Alternate Data Streams for .NET Standard and .NET Core.","archived":false,"fork":false,"pushed_at":"2020-07-21T19:17:32.000Z","size":26,"stargazers_count":5,"open_issues_count":0,"forks_count":0,"subscribers_count":2,"default_branch":"master","last_synced_at":"2025-04-07T02:35:17.398Z","etag":null,"topics":["csharp","dotnet","dotnet-core","ntfs","ntfs-data-streams","pinvoke","pinvoke-wrapper","win32","win32-api","windows","windows-api"],"latest_commit_sha":null,"homepage":"","language":"C#","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"apache-2.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/Emzi0767.png","metadata":{"files":{"readme":"README.MD","changelog":null,"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":"2020-07-21T15:26:59.000Z","updated_at":"2023-08-14T17:49:16.000Z","dependencies_parsed_at":"2023-08-09T05:03:51.712Z","dependency_job_id":null,"html_url":"https://github.com/Emzi0767/Managed-NTFS-Data-Streams","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Emzi0767%2FManaged-NTFS-Data-Streams","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Emzi0767%2FManaged-NTFS-Data-Streams/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Emzi0767%2FManaged-NTFS-Data-Streams/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Emzi0767%2FManaged-NTFS-Data-Streams/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/Emzi0767","download_url":"https://codeload.github.com/Emzi0767/Managed-NTFS-Data-Streams/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":252046269,"owners_count":21685983,"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":["csharp","dotnet","dotnet-core","ntfs","ntfs-data-streams","pinvoke","pinvoke-wrapper","win32","win32-api","windows","windows-api"],"created_at":"2024-11-12T17:12:05.616Z","updated_at":"2025-05-02T13:32:20.184Z","avatar_url":"https://github.com/Emzi0767.png","language":"C#","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Managed NTFS Data Streams\nA Win32 API wrapper, enabling support for NTFS Alternate Data Streams within .NET Standard and .NET Core. \n\nAs the library is built around Win32 P/Invoke, platforms other than Windows are not supported. Furthermore, as the APIs \nused are specific to Windows versions no less than Vista, this library will not run under Windows XP. Lastly, the \nfeature set implemented targets NTFS specifically, however any file system with named data stream support should work, \nprovided the loaded driver exposes said functionality (as of Windows 10 1909, the only built-in filesystems which \nsupport this feature are NTFS and ReFS, albeit the latter has some limitations).\n\n## Usage\nAfter installing the library via NuGet, several extension methods for `FileInfo` will become available via the \n`Emzi0767.NtfsDataStreams` namespace.\n\n### `FileDataStream` class\nThis class provides information about a single data stream, including stream's byte length, name, and the file it's \nattached to.\n\nThis class provides an interface similar to that of `FileInfo`. Using an instance of this class, you an perform I/O \noperations on an existing stream, such as reading, writing, or deleting.\n\n### Querying available data streams\n```cs\nfileInfo.EnumerateDataStreams()\n```\n\nReturns an enumerator over the available data streams for given file. Each stream will be represented as an instance \nof `FileDataStream` class.\n\n**NOTE**: Improperly disposing of this enumerator might lead to handle leakage. When using this enumerator outside of \nLINQ or `foreach` loops, make sure to enumerate it fully, or dispose of it explicitly. This way any internal handles \nwill be released.\n\n### Retrieving a single data stream\n```cs\nfileInfo.GetDataStream(string name)\n```\n\nReturns information about a single data stream as an instance of `FileDataStream`, or `null` if a stream with a given \nname does not exist.\n\n### Creating a new data stream\n```cs\nfileInfo.CreateDataStream(string name)\n```\n\nCreates a new data stream, and returns a `FileStream` for performing I/O operations on it. If the stream already \nexists, this method will fail with an exception.\n\n```cs\nfileInfo.CreateTextDataStream(string name, Encoding encoding)\n```\n\nLike above, but wraps the created stream into a `StreamWriter` instance.\n\n## Notes about data streams\nEvery file has a default stream, with an empty name. This stream is missing for directories. In this implementation, \nany operations on the default stream will be applied to the file instead.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Femzi0767%2Fmanaged-ntfs-data-streams","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Femzi0767%2Fmanaged-ntfs-data-streams","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Femzi0767%2Fmanaged-ntfs-data-streams/lists"}