-
Notifications
You must be signed in to change notification settings - Fork 21
Expand file tree
/
Copy pathDelete.java
More file actions
41 lines (32 loc) · 1015 Bytes
/
Delete.java
File metadata and controls
41 lines (32 loc) · 1015 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
/*
* SPDX-FileCopyrightText: Copyright (c) 2016-2025 Objectionary.com
* SPDX-License-Identifier: MIT
*/
package org.eolang.lints.fix;
import com.github.lombrozo.xnav.Xnav;
public class Delete {
private final String path;
private final boolean recursive;
private final boolean ignoreIfNotExists;
public Delete(String path, boolean recursive, boolean ignoreIfNotExists) {
this.path = path;
this.recursive = recursive;
this.ignoreIfNotExists = ignoreIfNotExists;
}
public Delete(final Xnav xnav) {
this(
xnav.element("path").text().get(),
Boolean.parseBoolean(xnav.element("recursive").text().orElse("")),
Boolean.parseBoolean(xnav.element("ignoreIfNotExists").text().orElse(""))
);
}
public String path() {
return this.path;
}
public boolean recursive() {
return this.recursive;
}
public boolean ignoreIfNotExists() {
return this.ignoreIfNotExists;
}
}