M3D / M3D / Utility / FileHelper
Class: FileHelper
Table of contents
Constructors
Methods
Constructors
constructor
• new FileHelper(): FileHelper
Returns
Methods
findFile
▸ findFile(sourceFilePath
, scene
): any
[]
查找文件
Parameters
Name | Type |
---|---|
sourceFilePath | string |
scene | Scene |
Returns
any
[]
Description
查找顺序 a 指定参数路径 b 模型文件同目录 c 各平台的用户路径
getFileNameFromUrl
▸ getFileNameFromUrl(fileUrl
): string
从url中获取文件名
Parameters
Name | Type |
---|---|
fileUrl | string |
Returns
string
getServerFilePath
▸ getServerFilePath(fileName
): any
Parameters
Name | Type |
---|---|
fileName | string |
Returns
any
getSuffix
▸ getSuffix(fileName
): String
获取文件后缀
Parameters
Name | Type |
---|---|
fileName | String |
Returns
String
getUnionStylePath
▸ getUnionStylePath(filePath
): string
Parameters
Name | Type |
---|---|
filePath | string |
Returns
string