Scala: changed Test to use current dir
This commit is contained in:
@@ -6,10 +6,10 @@ import java.util.List;
|
||||
|
||||
public class Test {
|
||||
//
|
||||
private static String CORNER = " └── ";
|
||||
private static String BLANK = " ";
|
||||
private static String JUNCTION = " ├── ";
|
||||
private static String LINE = " │ ";
|
||||
private static String CORNER = "└── ";
|
||||
private static String BLANK = " ";
|
||||
private static String JUNCTION = "├── ";
|
||||
private static String LINE = "│ ";
|
||||
|
||||
static void recurse(Directory d, int level) {
|
||||
List<Directory> subs = d.children;
|
||||
@@ -24,7 +24,7 @@ public class Test {
|
||||
while (temp.parent != null) {
|
||||
if (temp.parent.children.indexOf(temp) == temp.parent.children.size() - 1) {
|
||||
if (loop == 0) {
|
||||
s = CORNER + s;
|
||||
s = CORNER + s;
|
||||
} else {
|
||||
s = BLANK + s;
|
||||
}
|
||||
|
||||
@@ -41,7 +41,7 @@ object Test extends App {
|
||||
}
|
||||
}
|
||||
|
||||
val dir = new Directory(new File("/home/rob"))
|
||||
val dir = new Directory(new File(if (args.length > 0) args(0) else "."))
|
||||
val s = "%,16d".format(dir.totalSize) + " " + dir.fsdir.getCanonicalPath
|
||||
println(s)
|
||||
recurse(dir, 1)
|
||||
|
||||
@@ -7,5 +7,6 @@
|
||||
</content>
|
||||
<orderEntry type="inheritedJdk" />
|
||||
<orderEntry type="sourceFolder" forTests="false" />
|
||||
<orderEntry type="library" name="scala-sdk-2.13.6" level="application" />
|
||||
</component>
|
||||
</module>
|
||||
Reference in New Issue
Block a user