Class FileMethods
- Namespace
- FoundationaLLM.Common.Utils
- Assembly
- FoundationaLLM.Common.dll
Contains methods for working with files.
public class FileMethods
- Inheritance
-
FileMethods
- Inherited Members
- Extension Methods
Methods
GetMessageContentFileType(string?, string?)
Returns the type of the message content based on the file name.
public static string GetMessageContentFileType(string? fileName, string? fallbackValue)
Parameters
fileName
stringThe file name to evaluate.
fallbackValue
stringIf populated, defines the fallback type value if a mapping cannot be determined from the passed in file name. Otherwise, the default value is FilePath.
Returns
GetMimeType(byte[])
Returns the mime type of the file data.
public static string GetMimeType(byte[] fileData)
Parameters
fileData
byte[]The byte array for the file to inspect.