Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/xjine/unity_ioutility
IOUtility.cs provides some functions to iterate files.
https://github.com/xjine/unity_ioutility
assets unity
Last synced: 15 days ago
JSON representation
IOUtility.cs provides some functions to iterate files.
- Host: GitHub
- URL: https://github.com/xjine/unity_ioutility
- Owner: XJINE
- License: bsd-3-clause
- Created: 2022-07-07T07:47:43.000Z (over 2 years ago)
- Default Branch: main
- Last Pushed: 2022-07-07T09:02:28.000Z (over 2 years ago)
- Last Synced: 2024-03-20T20:12:36.116Z (10 months ago)
- Topics: assets, unity
- Language: C#
- Homepage:
- Size: 26.4 KB
- Stars: 2
- Watchers: 3
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# Unity_IOUtility
``IOUtility.cs`` provides some functions to iterate files.
## Importing
You can use Package Manager or import it directly.
```
https://github.com/XJINE/Unity_IOUtility.git?path=Assets/Packages/IOUtility
```## Functions
```csharp
public static IEnumerable GetFilesFromAssets(string dir = "", SearchOption option = SearchOption.AllDirectories)
{
return GetFiles((Path.Combine(Application.dataPath, dir)));
}public static IEnumerable GetFilesFromStreamingAssets(string dir = "", SearchOption option = SearchOption.AllDirectories)
{
return GetFiles((Path.Combine(Application.streamingAssetsPath, dir)));
}public static IEnumerable GetFiles(string dir, SearchOption option = SearchOption.AllDirectories)
{
return new DirectoryInfo(dir).EnumerateFiles("*", option);
}
```