updating rename
							parent
							
								
									c3bcdeced6
								
							
						
					
					
						commit
						56d18deb1e
					
				|  | @ -1,5 +1,6 @@ | ||||||
| # Copyright (c) 2020 Evan Hemsley | # 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"), | 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, | to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, | ||||||
|  |  | ||||||
							
								
								
									
										37
									
								
								README.md
								
								
								
								
							
							
						
						
									
										37
									
								
								README.md
								
								
								
								
							|  | @ -1,35 +1,26 @@ | ||||||
| # SharpPhysFS | # MoonTools.NETPhysFS | ||||||
| ## PhysicsFS wrapper for .NET |  | ||||||
| 
 | 
 | ||||||
| This library is a wrapper around the [PhysFS library](https://icculus.org/physfs/) designed | ## PhysFS wrapper for .NET Standard | ||||||
| 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. | 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. | ||||||
| ## 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 | ## Installation | ||||||
| 
 | 
 | ||||||
| You can use this library by compiling it as described in the [wiki](https://github.com/frabert/SharpPhysFS/wiki) | You can use this library by adding it as a submodule and then referencing it in your .csproj file. | ||||||
| or by adding it as a reference using NuGet: |  | ||||||
| 
 | 
 | ||||||
|     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# | ```csharp | ||||||
| using(var pfs = new PhysFS("")) // This ensures correct initialization and deinitialization | using var pfs = new PhysFS(""); // automatic dispose pattern | ||||||
| using(var reader = new StreamReader(pfs.OpenRead("/helloworld.txt"))) | using (var reader = new StreamReader(pfs.OpenRead("/helloworld.txt"))) | ||||||
| { | { | ||||||
|   var contents = reader.ReadToEnd(); |   var contents = reader.ReadToEnd(); | ||||||
| } | } | ||||||
| ```` | ``` | ||||||
|  |  | ||||||
		Loading…
	
		Reference in New Issue