Skip to content

Commit c4ca488

Browse files
committed
Add Builder#file(File) convenience method
It invokes Builder#file(String) with the absolute file path.
1 parent a6cf214 commit c4ca488

File tree

1 file changed

+12
-0
lines changed

1 file changed

+12
-0
lines changed

src/main/java/org/apposed/appose/Builder.java

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -198,6 +198,18 @@ default T channels(String... channels) {
198198
*/
199199
T channels(List<String> channels);
200200

201+
/**
202+
* Specifies a configuration file to build from.
203+
* Reads the file content immediately and delegates to {@link #content(String)}.
204+
*
205+
* @param file Configuration file (e.g., pixi.toml, environment.yml)
206+
* @return This builder instance, for fluent-style programming.
207+
* @throws BuildException If the file cannot be read
208+
*/
209+
default T file(File file) throws BuildException {
210+
return file(file.getAbsolutePath());
211+
}
212+
201213
/**
202214
* Specifies a configuration file path to build from.
203215
* Reads the file content immediately and delegates to {@link #content(String)}.

0 commit comments

Comments
 (0)