Package com.dslplatform.compiler.client
Class Utils
java.lang.Object
com.dslplatform.compiler.client.Utils
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionstatic classprivate static class -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionstatic voiddeletePath(File path) private static voiddeletePathAndRetry(File path, int retry) static voiddownloadFile(File file, URL url) private static voiddownloadFileAndRetry(File file, URL url, int retry) findCommand(Context context, String path, String name, String contains) private static voidfindNonEmptyDirs(File path, String extension) private static voidfindNonEmptyDirs(File path, List<File> foundFiles, String extension) static booleanlistSources(File source, Context context, String extension) private static voidlogCommand(Context context, ProcessBuilder builder) static Stringread(InputStream stream) readXml(InputStream stream) static Either<Utils.CommandResult> static Either<Utils.CommandResult> static voidstatic booleantestCommand(Context context, String command, String contains) static booleanstatic longprivate static long
-
Constructor Details
-
Utils
public Utils()
-
-
Method Details
-
read
- Throws:
IOException
-
readFile
-
saveFile
- Throws:
IOException
-
findFiles
-
findFiles
-
unpackZip
- Throws:
IOException
-
unpackZip
private static long unpackZip(Context context, File path, URL remoteUrl, ArrayList<File> unpackedFiles, int retry) throws IOException - Throws:
IOException
-
downloadFile
- Throws:
IOException
-
downloadFileAndRetry
- Throws:
IOException
-
readXml
-
isWindows
public static boolean isWindows() -
logCommand
-
findCommand
-
testCommand
-
testCommand
-
runCommand
-
runCommand
-
deletePath
- Throws:
IOException
-
deletePathAndRetry
- Throws:
IOException
-
findNonEmptyDirs
-
findNonEmptyDirs
-
listSources
-