File tree Expand file tree Collapse file tree 1 file changed +25
-0
lines changed
src/main/java/cz/jiripinkas/jsitemapgenerator Expand file tree Collapse file tree 1 file changed +25
-0
lines changed Original file line number Diff line number Diff line change 8
8
import java .net .*;
9
9
import java .nio .charset .StandardCharsets ;
10
10
import java .nio .file .Path ;
11
+ import java .nio .file .Paths ;
11
12
import java .sql .Timestamp ;
12
13
import java .time .LocalDateTime ;
13
14
import java .util .Date ;
@@ -177,6 +178,30 @@ public T toFile(Path path) throws IOException {
177
178
return toFile (path .toFile ());
178
179
}
179
180
181
+ /**
182
+ * Construct and save sitemap to output file
183
+ *
184
+ * @param first The path string or initial part of the path string
185
+ * @param more Additional strings to be joined to form the path string
186
+ * @return this
187
+ * @throws IOException when error
188
+ */
189
+ public T toFile (String first , String ... more ) throws IOException {
190
+ return toFile (Paths .get (first , more ));
191
+ }
192
+
193
+ /**
194
+ * Construct and save sitemap to output file
195
+ *
196
+ * @param parent The parent abstract pathname
197
+ * @param child The child pathname string
198
+ * @return this
199
+ * @throws IOException when error
200
+ */
201
+ public T toFile (File parent , String child ) throws IOException {
202
+ return toFile (new File (parent , child ));
203
+ }
204
+
180
205
/**
181
206
* Ping Google that sitemap has changed. Will call this URL:
182
207
* https://www.google.com/ping?sitemap=URL_Encoded_sitemapUrl
You can’t perform that action at this time.
0 commit comments