//------------------------------------------------------------
// Game Framework
// Copyright © 2013-2021 loyalsoft. All rights reserved.
// Homepage: http://www.game7000.com/
// Feedback: http://www.game7000.com/
//------------------------------------------------------------
using GameFramework.FileSystem;
using System;
namespace UnityGameFramework.Runtime
{
///
/// 默认文件系统辅助器。
///
public class DefaultFileSystemHelper : FileSystemHelperBase
{
private const string AndroidFileSystemPrefixString = "jar:";
///
/// 创建文件系统流。
///
/// 要加载的文件系统的完整路径。
/// 要加载的文件系统的访问方式。
/// 是否创建新的文件系统流。
/// 创建的文件系统流。
public override FileSystemStream CreateFileSystemStream(string fullPath, FileSystemAccess access, bool createNew)
{
if (fullPath.StartsWith(AndroidFileSystemPrefixString, StringComparison.Ordinal))
{
return new AndroidFileSystemStream(fullPath, access, createNew);
}
else
{
return new CommonFileSystemStream(fullPath, access, createNew);
}
}
}
}