Class FileExtensions
Inheritance
FileExtensions
Assembly: Glitch9.IO.dll
Syntax
public static class FileExtensions
Methods
|
Edit this page
View Source
Declaration
public static T GetMetadata<T>(this SerializableFileInfo fileInfo, string key)
Parameters
Returns
Type Parameters
|
Edit this page
View Source
GetUnityObjectOrNull<T>(IFile)
Declaration
public static T GetUnityObjectOrNull<T>(this IFile file) where T : Object
Parameters
| Type |
Name |
Description |
| IFile |
file |
|
Returns
Type Parameters
|
Edit this page
View Source
IsImage(byte[])
Declaration
public static bool IsImage(this byte[] fileBytes)
Parameters
| Type |
Name |
Description |
| byte[] |
fileBytes |
|
Returns
|
Edit this page
View Source
SaveTextureToFileAsync(byte[], string, CancellationToken)
Declaration
public static UniTask SaveTextureToFileAsync(this byte[] textureAsBytes, string path, CancellationToken cancellationToken = default)
Parameters
Returns
|
Edit this page
View Source
SaveTextureToFileAsync(Texture2D, string, CancellationToken)
Declaration
public static UniTask SaveTextureToFileAsync(this Texture2D texture, string path, CancellationToken cancellationToken = default)
Parameters
Returns
|
Edit this page
View Source
ToBase64String(IFile)
Declaration
public static string ToBase64String(this IFile file)
Parameters
| Type |
Name |
Description |
| IFile |
file |
|
Returns
|
Edit this page
View Source
ToFile<T>(T, string)
Declaration
public static File<T> ToFile<T>(this T unityObject, string fullPath = null) where T : Object
Parameters
| Type |
Name |
Description |
| T |
unityObject |
|
| string |
fullPath |
|
Returns
Type Parameters
|
Edit this page
View Source
ToList<T>(IList<IFile>)
Declaration
public static List<File<T>> ToList<T>(this IList<IFile> files) where T : Object
Parameters
Returns
Type Parameters