updating rename

pull/2/head
Evan Hemsley 2020-01-17 19:29:39 -08:00
parent c3bcdeced6
commit 56d18deb1e
10 changed files with 16 additions and 24 deletions

View File

@ -1,5 +1,6 @@
# Copyright (c) 2020 Evan Hemsley
# Based on SharpPhysFS by Francesco Bertolaccini
Forked from SharpPhysFS by Francesco Bertolaccini
Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"),
to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense,

View File

@ -1,35 +1,26 @@
# SharpPhysFS
## PhysicsFS wrapper for .NET
# MoonTools.NETPhysFS
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.
## PhysFS wrapper for .NET Standard
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.
This library is a .NET Standard wrapper around the cross-platform IO libary [PhysFS](https://icculus.org/physfs/).
It provides *IEnumerable* iterators to avoid creating garbage, and a *Stream* subclass for easy usage.
## 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:
You can use this library by adding it as a submodule and then referencing it in your .csproj file.
Install-Package SharpPhysFS
```sh
git submodule add
```
You should also include compiled shared library of physfs alongside your binary files to be loaded.
You must include a compiled binary of PhysFS for your platform for this to work properly.
## Usage
## Example
````c#
using(var pfs = new PhysFS("")) // This ensures correct initialization and deinitialization
```csharp
using var pfs = new PhysFS(""); // automatic dispose pattern
using (var reader = new StreamReader(pfs.OpenRead("/helloworld.txt")))
{
var contents = reader.ReadToEnd();
}
````
```