https://github.com/frabert/sharpphysfs
Managed wrapper for the PhysFS library
https://github.com/frabert/sharpphysfs
csharp dotnet filesystem physfs physfs-library wrapper
Last synced: 9 months ago
JSON representation
Managed wrapper for the PhysFS library
- Host: GitHub
- URL: https://github.com/frabert/sharpphysfs
- Owner: frabert
- License: mit
- Created: 2016-01-26T21:54:17.000Z (over 10 years ago)
- Default Branch: master
- Last Pushed: 2017-08-15T11:38:00.000Z (almost 9 years ago)
- Last Synced: 2025-08-28T17:30:05.068Z (10 months ago)
- Topics: csharp, dotnet, filesystem, physfs, physfs-library, wrapper
- Language: C#
- Size: 83 KB
- Stars: 21
- Watchers: 3
- Forks: 3
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- Changelog: CHANGELOG.md
- License: LICENSE.md
Awesome Lists containing this project
README
# SharpPhysFS
## PhysicsFS wrapper for .NET
This library is a wrapper around the [PhysFS library](https://icculus.org/physfs/) designed
to work with .NET languages. As such, it employs standard .NET behaviors such as *Exceptions*
and *IEnumerable*s to represent native objects. It also provides a *Stream* subclass for easy use of the APIs.
The documentation for the methods is copied from the original doxygen and only slightly adapted.
## Platform support
The library is designed to work regardless of the underlying OS, so it should run on Windows, Linux
and OSX equally well. I haven't tested the OSX port though, and I only superficially tried it on Linux.
If anyone feels so inclined, he/she could contribute by testing it and reporting the results. This would
be greatly appreciated.
## Installation
You can use this library by compiling it as described in the [wiki](https://github.com/frabert/SharpPhysFS/wiki)
or by adding it as a reference using NuGet:
Install-Package SharpPhysFS
You should also include compiled shared library of physfs alongside your binary files to be loaded.
## Usage
````c#
using(var pfs = new PhysFS("")) // This ensures correct initialization and deinitialization
using(var reader = new StreamReader(pfs.OpenRead("/helloworld.txt")))
{
var contents = reader.ReadToEnd();
}
````