Yahoo!WidgetEngineReference-[File Paths]

File Paths

File paths in the engine are always relative to the location of the XML file. That means a file reference without a directory (e.g. main.js) will be looked for in the same directory as the XML file while one with a directory (e.g. javascript/main.js) will be looked for in the specified subdirectory of the directory the XML file resides in. It is not advised to use absolute paths (ones that begin with a /) since the disk layout of people's machines can differ quite markedly.
エンジンでのファイルパスは、常にXMLファイルからの相対パスとして扱われる。これにより、ディレクトリ指定のないファイル参照(例:"main.js")ではXMLファイルと同じディレクトリ内が検索される。一方、ディレクトリ指定ありのファイル参照(例"javascript/main.js")では、XMLファイルが存在するディレクトリ内の、指定されたサブディレクトリ内が検索される。なお、絶対パスは使わないことをおすすめする。これは、ウィジェットを使う人のマシンのディスクレイアウトはそれぞれにかなり違っているからだ。

コメント