Ecosyste.ms: Awesome

An open API service indexing awesome lists of open source software.

Awesome Lists | Featured Topics | Projects

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.

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);
}
```