public class NdiUtils extends Object
| Modifier and Type | Class and Description |
|---|---|
static class |
NdiUtils.DoWhenExist |
static class |
NdiUtils.DoWhenNotExists |
| Constructor and Description |
|---|
NdiUtils() |
| Modifier and Type | Method and Description |
|---|---|
static String |
betterPath(String path1) |
static void |
generateScript(String resourcePath,
BufferedWriter w,
Function<String,String> mapper) |
static String |
generateScriptAsString(String resourcePath,
Function<String,String> mapper) |
static boolean |
isPath(String p) |
static boolean |
isPathFolder(String p) |
static byte[] |
loadFile(Path out) |
static String |
longestCommonParent(String path1,
String path2) |
static String |
replaceFilePrefix(String path,
String prefix,
String replacement) |
static String |
replaceFilePrefixes(String path,
Map<String,String> map) |
static boolean |
setExecutable(Path path) |
static Path |
sysWhich(String commandName) |
static Path[] |
sysWhichAll(String commandName) |
static PathInfo.Status |
tryWrite(byte[] content,
Path out,
NdiUtils.DoWhenExist doWhenExist,
NdiUtils.DoWhenNotExists doWhenNotExist,
net.thevpc.nuts.NutsSession session) |
static PathInfo.Status |
tryWrite(byte[] content,
Path out,
net.thevpc.nuts.NutsSession session) |
static PathInfo.Status |
tryWriteStatus(byte[] content,
Path out,
net.thevpc.nuts.NutsSession session) |
public static boolean isPathFolder(String p)
public static boolean isPath(String p)
public static boolean setExecutable(Path path)
public static String generateScriptAsString(String resourcePath, Function<String,String> mapper)
public static void generateScript(String resourcePath, BufferedWriter w, Function<String,String> mapper)
public static String replaceFilePrefix(String path, String prefix, String replacement)
public static byte[] loadFile(Path out)
public static PathInfo.Status tryWriteStatus(byte[] content, Path out, net.thevpc.nuts.NutsSession session)
public static PathInfo.Status tryWrite(byte[] content, Path out, net.thevpc.nuts.NutsSession session)
public static PathInfo.Status tryWrite(byte[] content, Path out, NdiUtils.DoWhenExist doWhenExist, NdiUtils.DoWhenNotExists doWhenNotExist, net.thevpc.nuts.NutsSession session)
Copyright © 2021 vpc open source initiative. All rights reserved.