From 56d18deb1e6636fe6fdee4a02ecc5003ec0f0916 Mon Sep 17 00:00:00 2001 From: Evan Hemsley <2342303+ehemsley@users.noreply.github.com> Date: Fri, 17 Jan 2020 19:29:39 -0800 Subject: [PATCH] updating rename --- LICENSE.md | 3 +- {SharpPhysFS => NETPhysFS}/Doxyfile | 0 {SharpPhysFS => NETPhysFS}/Interop.cs | 0 {SharpPhysFS => NETPhysFS}/NETPhysFS.csproj | 0 {SharpPhysFS => NETPhysFS}/PhysFS.LowLevel.cs | 0 {SharpPhysFS => NETPhysFS}/PhysFS.cs | 0 {SharpPhysFS => NETPhysFS}/PhysFSStream.cs | 0 {SharpPhysFS => NETPhysFS}/app.config | 0 .../targets/copylibs.targets | 0 README.md | 37 +++++++------------ 10 files changed, 16 insertions(+), 24 deletions(-) rename {SharpPhysFS => NETPhysFS}/Doxyfile (100%) rename {SharpPhysFS => NETPhysFS}/Interop.cs (100%) rename {SharpPhysFS => NETPhysFS}/NETPhysFS.csproj (100%) rename {SharpPhysFS => NETPhysFS}/PhysFS.LowLevel.cs (100%) rename {SharpPhysFS => NETPhysFS}/PhysFS.cs (100%) rename {SharpPhysFS => NETPhysFS}/PhysFSStream.cs (100%) rename {SharpPhysFS => NETPhysFS}/app.config (100%) rename {SharpPhysFS => NETPhysFS}/targets/copylibs.targets (100%) diff --git a/LICENSE.md b/LICENSE.md index 421e5b2..6d91bf8 100644 --- a/LICENSE.md +++ b/LICENSE.md @@ -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, diff --git a/SharpPhysFS/Doxyfile b/NETPhysFS/Doxyfile similarity index 100% rename from SharpPhysFS/Doxyfile rename to NETPhysFS/Doxyfile diff --git a/SharpPhysFS/Interop.cs b/NETPhysFS/Interop.cs similarity index 100% rename from SharpPhysFS/Interop.cs rename to NETPhysFS/Interop.cs diff --git a/SharpPhysFS/NETPhysFS.csproj b/NETPhysFS/NETPhysFS.csproj similarity index 100% rename from SharpPhysFS/NETPhysFS.csproj rename to NETPhysFS/NETPhysFS.csproj diff --git a/SharpPhysFS/PhysFS.LowLevel.cs b/NETPhysFS/PhysFS.LowLevel.cs similarity index 100% rename from SharpPhysFS/PhysFS.LowLevel.cs rename to NETPhysFS/PhysFS.LowLevel.cs diff --git a/SharpPhysFS/PhysFS.cs b/NETPhysFS/PhysFS.cs similarity index 100% rename from SharpPhysFS/PhysFS.cs rename to NETPhysFS/PhysFS.cs diff --git a/SharpPhysFS/PhysFSStream.cs b/NETPhysFS/PhysFSStream.cs similarity index 100% rename from SharpPhysFS/PhysFSStream.cs rename to NETPhysFS/PhysFSStream.cs diff --git a/SharpPhysFS/app.config b/NETPhysFS/app.config similarity index 100% rename from SharpPhysFS/app.config rename to NETPhysFS/app.config diff --git a/SharpPhysFS/targets/copylibs.targets b/NETPhysFS/targets/copylibs.targets similarity index 100% rename from SharpPhysFS/targets/copylibs.targets rename to NETPhysFS/targets/copylibs.targets diff --git a/README.md b/README.md index d9dd11f..80a7024 100644 --- a/README.md +++ b/README.md @@ -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 -using(var reader = new StreamReader(pfs.OpenRead("/helloworld.txt"))) +```csharp +using var pfs = new PhysFS(""); // automatic dispose pattern +using (var reader = new StreamReader(pfs.OpenRead("/helloworld.txt"))) { var contents = reader.ReadToEnd(); } -```` \ No newline at end of file +```