Skip to content

fnc c0037 getFilePath

tickle edited this page Jul 17, 2023 · 4 revisions

← オブジェクトリファレンスに戻る

getFilePath

概要

  • 譜面ヘッダーで指定されたファイルパスを、キーワードとディレクトリに分割する関数。

引数(括弧内はデフォルト値)

引数 必須 指定内容
_fileName string * ファイルパス
_directory string デフォルトディレクトリ。既定は(空)

返却値

  • [ファイルキーワード, 参照するルートディレクトリ]

使用例

// カスタムjsの場合
console.log(getFilePath(`file.txt`, `../js/`)); // [`file.txt`, `../js/`] => ../js/file.txt
console.log(getFilePath(`(..)file.txt`, `../js/`)); // [`file.txt`, ``] => file.txt

// スキンの場合
console.log(getFilePath(`(..)light`, `../skin/`)); // [`light`, ``] => danoni_skin_light.css
console.log(getFilePath(`sub/blue`, `../skin/`)); // [`blue`, `../skin/sub/`] => ../skin/sub/danoni_skin_blue.css

関連項目

English | Japanese

How To Play
(プレイ方法)

How To Make
(作り方、移行方法)

How To Upgrade? / What's New?
(本体の更新方法、更新情報)

Specification (for creators)
(仕様・製作者向け)

Specification (for developers)
(仕様・開発者向け)

Tips
(用途別対処方法)

Repository Local Rules
(リポジトリルール・管理者向け)

Others
(その他)

Clone this wiki locally