• Introduction
  • C# API
  • GraphQL API
  • Home
  • Blog
  • Docs
  • GitHub
  • Snowflake.Model.Game.LibraryExtensions
  • IGameFileExtension
Show / Hide Table of Contents
  • Snowflake.Configuration
    • ConfigurationCollection<T>
    • ConfigurationCollectionDescriptor<T>
    • ConfigurationOptionDescriptor
    • ConfigurationOptionType
    • ConfigurationSection<T>
    • ConfigurationSectionDescriptor<T>
    • ConfigurationValueCollection
    • IConfigurationCollection
    • IConfigurationCollection<T>
    • IConfigurationCollectionDescriptor
    • IConfigurationOptionDescriptor
    • IConfigurationProperty
    • IConfigurationSection
    • IConfigurationSection<T>
    • IConfigurationSectionDescriptor
    • IConfigurationTypeMapper
    • IConfigurationValue
    • IConfigurationValueCollection
    • ISelectionOptionDescriptor
    • PathType
    • SelectionOptionDescriptor
  • Snowflake.Configuration.Attributes
    • ConfigurationOptionAttribute
    • ConfigurationSectionAttribute
    • ConfigurationTargetAttribute
    • ConfigurationTargetMemberAttribute
    • CustomMetadataAttribute
    • InputTemplateAttribute
    • SelectionOptionAttribute
  • Snowflake.Configuration.Input
    • DictionaryInputMapping
    • IDeviceInputMapping
    • IInputOption
    • IInputSerializer
    • IInputTemplate
    • IInputTemplate<T>
    • InputConfigurationSection<T>
    • InputOption
    • InputOptionAttribute
    • InputTemplate<T>
  • Snowflake.Configuration.Interceptors
    • ConfigurationInterceptor
  • Snowflake.Configuration.Serialization
    • AbstractConfigurationNode<T>
    • BooleanConfigurationNode
    • ConfigurationTarget
    • ConfigurationTraversalContext
    • DecimalConfigurationNode
    • DeviceCapabilityElementConfigurationNode
    • EnumConfigurationNode
    • IAbstractConfigurationNode
    • IAbstractConfigurationNode<T>
    • IConfigurationSerializationContext<T>
    • IConfigurationTarget
    • IConfigurationTransformer<TOutput>
    • IConfigurationTraversalContext
    • IntegralConfigurationNode
    • ListConfigurationNode
    • StringConfigurationNode
    • UnknownConfigurationNode
  • Snowflake.Configuration.Serialization.Serializers
    • AbstractStringConfigurationSerializer
    • ConfigurationSerializer<T>
    • StringSerializationContext
    • StringSerializationContextExtensions
  • Snowflake.Configuration.Serialization.Serializers.Implementations
    • SimpleCfgConfigurationSerializer
    • SimpleIniConfigurationSerializer
    • SimpleJsonConfigurationSerializer
    • SimpleXmlConfigurationSerializer
  • Snowflake.Extensibility
    • IEmptyPluginConfiguration
    • ILogger
    • IPlugin
    • IPluginCollection<T>
    • LogLevel
    • PluginAttribute
    • PluginCollection<T>
    • PluginInfoFields
  • Snowflake.Extensibility.Configuration
    • IPluginConfigurationStore
  • Snowflake.Extensibility.Provisioning
    • IPluginProperties
    • IPluginProvision
    • IProvisionedPlugin
    • PluginProvision
    • ProvisionedPlugin
  • Snowflake.Extensibility.Provisioning.Standalone
    • StandalonePlugin
    • StandalonePluginProvision
  • Snowflake.Extensibility.Queueing
    • IAsyncJobQueue
    • IAsyncJobQueue<T>
    • IAsyncJobQueue<TAsyncEnumerable, T>
    • IAsyncJobQueueFactory
  • Snowflake.Filesystem
    • DirectoryExtensions
    • FileExtensions
    • IDirectory
    • IFile
    • IIndelibleDirectory
    • IReadOnlyDirectory
    • IReadOnlyFile
  • Snowflake.Input.Controller
    • ControllerElement
    • ControllerElementCollection
    • ControllerElementExtensions
    • ControllerElementInfo
    • ControllerElementType
    • ControllerElementTypeExtensions
    • ControllerId
    • IControllerElementCollection
    • IControllerElementInfo
    • IControllerLayout
    • InvalidControllerIdException
  • Snowflake.Input.Controller.Mapped
    • ControllerElementMapping
    • ControllerElementMappingProfile
    • IControllerElementMappingProfile
    • IControllerElementMappingProfileStore
  • Snowflake.Input.Device
    • DefaultDeviceCapabilityLabels
    • DeviceCapability
    • DeviceCapabilityClass
    • DeviceCapabilityClasses
    • DeviceCapabilityExtensions
    • DeviceLayoutMapping
    • DictionaryDeviceCapabilityLabels
    • DirectInputDeviceInstance
    • IDeviceCapabilityLabels
    • IDeviceLayoutMapping
    • IInputDevice
    • IInputDeviceInstance
    • InputDriver
    • KeyboardDeviceInstance
    • PassthroughDeviceInstance
    • XInputDeviceInstance
  • Snowflake.Installation
    • AsyncInstallTask<T>
    • AsyncInstallTaskEnumerable<T>
    • ITaskResult
    • TaskResult
    • TaskResult<T>
  • Snowflake.Installation.Extensibility
    • GameInstaller
    • IGameInstaller
    • IInstallable
    • Installable
    • SupportedPlatformAttribute
  • Snowflake.Installation.Tasks
    • CopyDirectoryContentsTask
    • CopyFileTask
    • ExecuteAsyncTask<TResult>
    • ExtractZipTask
    • FailureTask<T>
  • Snowflake.Loader
    • IComposable
    • IModule
    • IModuleEnumerator
    • IModuleLoader<T>
    • ImportServiceAttribute
    • IServiceRepository
    • Module
  • Snowflake.Model.Database.Exceptions
    • DependentEntityNotExistsException
    • EntityAlreadyExistsException
  • Snowflake.Model.Database.Migrations
    • Empty
    • InitialCreate
  • Snowflake.Model.Game
    • Game
    • IGame
    • IGameExtension
    • IGameLibrary
    • IPlatformInfo
    • ISystemFile
    • PlatformId
  • Snowflake.Model.Game.LibraryExtensions
    • GameConfigurationExtensionExtensions
    • GameFileExtensionExtensions
    • IGameConfigurationExtension
    • IGameConfigurationExtensionProvider
    • IGameExtensionProvider
    • IGameExtensionProvider<TExtension>
    • IGameFileExtension
    • IGameFileExtensionProvider
  • Snowflake.Model.Records
    • FileRecord
    • GameRecord
    • IMetadataCollection
    • IRecord
    • IRecordMetadata
    • IRecordMetadataQuery
    • MetadataCollection
    • RecordMetadata
  • Snowflake.Model.Records.File
    • FileMetadataKeys
    • IFileRecord
    • ImageMetadataKeys
    • ImageTypes
  • Snowflake.Model.Records.Game
    • GameMetadataKeys
    • IGameRecord
    • IGameRecordQuery
  • Snowflake.Orchestration.Extensibility
    • EmulatedController
    • EmulatedPortsManager
    • EmulatorCompatibility
    • EmulatorOrchestrator
    • GameEmulation
    • GameEmulation<TConfigurationCollection>
    • GameEmulationState
    • IEmulatedController
    • IEmulatedPortDeviceEntry
    • IEmulatedPortsManager
    • IEmulatedPortStore
    • IEmulatorOrchestrator
    • IGameEmulation
  • Snowflake.Orchestration.Extensibility.Extensions
    • DeviceEnumeratorExtensions
  • Snowflake.Orchestration.Process
    • IEmulatorExecutable
    • IEmulatorExecutableProvider
    • IProcessBuilder
    • ProcessExtensions
  • Snowflake.Orchestration.Saving
    • GameFileExtensionGameSaveManagerExtensions
    • IGameSaveManager
    • ISaveGame
    • ISaveProfile
    • SaveGame
    • SaveManagementStrategy
  • Snowflake.Orchestration.SystemFiles
    • ISystemFileProvider
  • Snowflake.Persistence
    • ISqlDatabase
    • SqliteDatabase
    • SqliteMemoryDatabase
  • Snowflake.Remoting.Electron
    • IElectronPackage
    • IElectronPackageProvider
  • Snowflake.Remoting.Kestrel
    • IKestrelServerMiddlewareProvider
    • IKestrelWebServerService
  • Snowflake.Romfile
    • IFileSignature
    • IRomFileInfo
    • IStructuredFilename
    • NamingConvention
    • RomFileInfo
    • StructuredFilename
  • Snowflake.Romfile.Extensions
    • StringExtensions
  • Snowflake.Romfile.Tokenizer
    • FieldType
    • GoodToolsTokenClassifier
    • NoIntroTokenClassifier
    • StructuredFilenameToken
  • Snowflake.Scraping
    • GameScrapeContext
    • IScrapeContext
    • ISeed
    • ISeedRootContext
    • Seed
    • SeedContent
    • SeedRootContext
  • Snowflake.Scraping.Extensibility
    • AttachTarget
    • Culler
    • Directive
    • DirectiveAttribute
    • FileInstallationTraverserBase
    • GameMetadataTraverserBase
    • ICuller
    • IFileInstallationTraverser
    • IGameMetadataTraverser
    • IScraper
    • IScraperDirective
    • ITraverser<TProducts, TEffectTarget>
    • Scraper
    • SeedBuilder
    • SeedTree
    • Traverser<TProducts, TEffectTarget>
  • Snowflake.Services
    • IContentDirectoryProvider
    • IDeviceEnumerator
    • ILogProvider
    • IPluginManager
    • IServiceEnumerator
    • IServiceRegistrationProvider
    • IStoneProvider
  • Snowflake.Shiragame
    • IRomInfo
    • ISerialInfo
    • IShiragameProvider
    • RomInfo
    • SerialInfo

Interface IGameFileExtension

Provides Snowflake.Filesystem managed filesystem access for a IGame.

Namespace: Snowflake.Model.Game.LibraryExtensions
Assembly: Snowflake.Framework.Primitives.dll
Syntax
public interface IGameFileExtension : IGameExtension

Properties

MediaRoot

The directory to store media such as boxarts, trailers, and screenshots.

Declaration
IIndelibleDirectory MediaRoot { get; }
Property Value
Type Description
IIndelibleDirectory

MiscRoot

The directory to store miscellaneous files related to the game.

Declaration
IIndelibleDirectory MiscRoot { get; }
Property Value
Type Description
IIndelibleDirectory

ProgramRoot

The directory to store game ROM files and other program data such as assets and game-specific BIOS files.

Declaration
IIndelibleDirectory ProgramRoot { get; }
Property Value
Type Description
IIndelibleDirectory

ResourceRoot

The directory to store resources required for the game to run.

Declaration
IIndelibleDirectory ResourceRoot { get; }
Property Value
Type Description
IIndelibleDirectory

Root

A read only view on the root path of the game directory context.

Declaration
IReadOnlyDirectory Root { get; }
Property Value
Type Description
IReadOnlyDirectory

RuntimeRoot

The directory to store temporary files during the execution of the game. This directory is cleared before an emulator is run, and the required files for the emulator can be copied here.

Declaration
IIndelibleDirectory RuntimeRoot { get; }
Property Value
Type Description
IIndelibleDirectory

SavesRoot

The directory to persist save files for a game.

Declaration
IIndelibleDirectory SavesRoot { get; }
Property Value
Type Description
IIndelibleDirectory

Methods

GetFileInfo(IFile)

Gets the IFileRecord for a given IFile in this game's root directory if it exists.

Declaration
IFileRecord GetFileInfo(IFile file)
Parameters
Type Name Description
IFile file

The IFile to get metadata for.

Returns
Type Description
IFileRecord

The IFileRecord if it exists, null if it does not.

GetFileInfoAsync(IFile)

Asynchronously gets the IFileRecord for a given IFile in this game's root directory if it exists.

Declaration
Task<IFileRecord> GetFileInfoAsync(IFile file)
Parameters
Type Name Description
IFile file

The IFile to get metadata for.

Returns
Type Description
System.Threading.Tasks.Task<IFileRecord>

The IFileRecord if it exists, null if it does not.

GetFileRecords()

Gets the list of IFileRecords that have been associated with this game. Note that IFileRecords are simply files that have metadata associated with them.

Declaration
IEnumerable<IFileRecord> GetFileRecords()
Returns
Type Description
System.Collections.Generic.IEnumerable<IFileRecord>

GetFileRecordsAsync()

Asynchronously gets the list of IFileRecords that have been associated with this game. Note that IFileRecords are simply files that have metadata associated with them.

Declaration
IAsyncEnumerable<IFileRecord> GetFileRecordsAsync()
Returns
Type Description
System.Collections.Generic.IAsyncEnumerable<IFileRecord>

GetRuntimeLocation()

Gets a working scratch directory for an emulator instance within RuntimeRoot.

Declaration
IDirectory GetRuntimeLocation()
Returns
Type Description
IDirectory

A working scratch directory for an emulator running instance. This directory is guaranteed to be unique. Emulators are responsible for their own cleanup and are well advised to delete this directory after execution completes.

RegisterFile(IFile, String)

Registers a IFile as IFileRecord. If this IFile already exists as a IFileRecord, the mimetype will be updated with the new mimetype, but no other existing metadata will be changed.

Declaration
IFileRecord RegisterFile(IFile file, string mimetype)
Parameters
Type Name Description
IFile file

The IFile to create a IFileRecord for.

System.String mimetype

The mimetype of the IFile, required for IFileRecords

Returns
Type Description
IFileRecord

The IFileRecord associated with the provided IFile.

RegisterFileAsync(IFile, String)

Asynchronously registers a IFile as IFileRecord. If this IFile already exists as a IFileRecord, the mimetype will be updated with the new mimetype, but no other existing metadata will be changed.

Declaration
Task<IFileRecord> RegisterFileAsync(IFile file, string mimetype)
Parameters
Type Name Description
IFile file

The IFile to create a IFileRecord for.

System.String mimetype

The mimetype of the IFile, required for IFileRecords

Returns
Type Description
System.Threading.Tasks.Task<IFileRecord>

The IFileRecord associated with the provided IFile.

Extension Methods

GameFileExtensionGameSaveManagerExtensions.WithSaves(IGameFileExtension)
In This Article
  • Properties
    • MediaRoot
    • MiscRoot
    • ProgramRoot
    • ResourceRoot
    • Root
    • RuntimeRoot
    • SavesRoot
  • Methods
    • GetFileInfo(IFile)
    • GetFileInfoAsync(IFile)
    • GetFileRecords()
    • GetFileRecordsAsync()
    • GetRuntimeLocation()
    • RegisterFile(IFile, String)
    • RegisterFileAsync(IFile, String)
  • Extension Methods
Built with ❤️ by @chyyran. Text content licensed under CC-BY-SA 4.0.