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
fileNamestringThe file name to evaluate.
fallbackValuestringIf 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
fileDatabyte[]The byte array for the file to inspect.
Returns
GetMimeType(string)
Returns the mime type of the file based on its name.
public static string GetMimeType(string fileName)
  Parameters
fileNamestringThe name of the file.
Returns
- string
 The mime type.