ph-bookshelf update

4.0
A.C.Sukazyo Eyre 2023-03-28 17:54:30 +08:00
parent 78fdd5f654
commit 39fb6be9d7
Signed by: Eyre_S
GPG Key ID: C17CE40291207874
2 changed files with 23 additions and 18 deletions

View File

@ -1,3 +1,8 @@
---
configurations:
prism.plugins: "treeview"
---
代码纯手打,没有经过 IDE 查错,如发现错误还请立即 issue
## 创建资源文件索引对象
@ -18,14 +23,14 @@ ResourcesPackage pack = new ResourcesPackage(Test.class, "assets");
第二个参数是在项目文件为根目录的路径下,你的资源文件的位置。
一般来说在IDE等项目管理环境下一个项目的源文件路径如下
```tree
src
╠═main
║ ╟─java
║ ╙─resources
╚═test
╟─java
╙─resources
```treeview
src/
|-- main/
| |-- java/
| └── resources/
└── test/
|-- java/
└── resources/
```
这个路径指的就是在{.lang-url}`src/main/resources`目录下的{.lang-url}`assets`文件夹。
@ -47,15 +52,15 @@ public ResDir getResDir (String path) throws IOException;
例如如果一个项目的 resources结构如下
```tree
resources
╠═assets
║ ╟─propertes.io
║ ╚═lang
║ ╚═default.lang
╚═idn
╟─ios
╙─windows
```treeview
resources/
|-- assets/
| |-- propertes.io
| └── lang/
| └── default.lang
└── idn/
|-- ios/
└── windows/
```
若要获取`default.lang`文件,则使用以下方法:

@ -1 +1 @@
Subproject commit 1e56cbb6342caa770b2df6dcc84d66b6bee0b06f
Subproject commit 4d442fee379788ea285667bf0b5ad8a7d1c4735a