mirror of
https://github.com/mudita/mudita-center.git
synced 2025-12-23 22:28:03 -05:00
20 lines
589 B
TypeScript
20 lines
589 B
TypeScript
/**
|
|
* Copyright (c) Mudita sp. z o.o. All rights reserved.
|
|
* For licensing, see https://github.com/mudita/mudita-center/blob/master/LICENSE.md
|
|
*/
|
|
|
|
import { MtpInterface } from "./app-mtp.interface"
|
|
import { DotnetMtp } from "./dotnet-mtp/dotnet-mtp"
|
|
import { NodeMtp } from "./node-mtp/node-mtp"
|
|
import { NodeMtpDeviceManager } from "./node-mtp/node-mtp-device-manager"
|
|
|
|
export class MtpFactory {
|
|
static createInstance(): MtpInterface {
|
|
if (process.platform === "win32") {
|
|
return new DotnetMtp()
|
|
} else {
|
|
return new NodeMtp(new NodeMtpDeviceManager())
|
|
}
|
|
}
|
|
}
|