跳到主要内容
版本:v10.0

M3D / M3D / Utility / FileHelper

Class: FileHelper

M3D.Utility.FileHelper

Table of contents​

Constructors​

Methods​

Constructors​

constructor​

• new FileHelper(): FileHelper

Returns​

FileHelper

Methods​

findFile​

▸ findFile(sourceFilePath, scene): any[]

查找文件

Parameters​

NameType
sourceFilePathstring
sceneScene

Returns​

any[]

Description

查找顺序 a 指定参数路径 b 模型文件同目录 c 各平台的用户路径


getFileNameFromUrl​

▸ getFileNameFromUrl(fileUrl): string

从url中获取文件名

Parameters​

NameType
fileUrlstring

Returns​

string


getServerFilePath​

▸ getServerFilePath(fileName): any

Parameters​

NameType
fileNamestring

Returns​

any


getSuffix​

▸ getSuffix(fileName): String

获取文件后缀

Parameters​

NameType
fileNameString

Returns​

String


getUnionStylePath​

▸ getUnionStylePath(filePath): string

Parameters​

NameType
filePathstring

Returns​

string