File tree Expand file tree Collapse file tree
src/main/java/ru/nsu/gunko/topic10/task3 Expand file tree Collapse file tree Original file line number Diff line number Diff line change 1+ target /
2+ ! .mvn /wrapper /maven-wrapper.jar
3+ ! ** /src /main /** /target /
4+ ! ** /src /test /** /target /
5+
6+ # ## IntelliJ IDEA ###
7+ .idea /modules.xml
8+ .idea /jarRepositories.xml
9+ .idea /compiler.xml
10+ .idea /libraries /
11+ * .iws
12+ * .iml
13+ * .ipr
14+
15+ # ## Eclipse ###
16+ .apt_generated
17+ .classpath
18+ .factorypath
19+ .project
20+ .settings
21+ .springBeans
22+ .sts4-cache
23+
24+ # ## NetBeans ###
25+ /nbproject /private /
26+ /nbbuild /
27+ /dist /
28+ /nbdist /
29+ /.nb-gradle /
30+ build /
31+ ! ** /src /main /** /build /
32+ ! ** /src /test /** /build /
33+
34+ # ## VS Code ###
35+ .vscode /
36+
37+ # ## Mac OS ###
38+ .DS_Store
Original file line number Diff line number Diff line change 1+ <?xml version =" 1.0" encoding =" UTF-8" ?>
2+ <project xmlns =" http://maven.apache.org/POM/4.0.0"
3+ xmlns : xsi =" http://www.w3.org/2001/XMLSchema-instance"
4+ xsi : schemaLocation =" http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd" >
5+ <modelVersion >4.0.0</modelVersion >
6+
7+ <groupId >ru.nsu.gunko.topic10.task3</groupId >
8+ <artifactId >main</artifactId >
9+ <version >1.0-SNAPSHOT</version >
10+
11+ <properties >
12+ <maven .compiler.source>21</maven .compiler.source>
13+ <maven .compiler.target>21</maven .compiler.target>
14+ <project .build.sourceEncoding>UTF-8</project .build.sourceEncoding>
15+ </properties >
16+
17+ <dependencies >
18+ <dependency >
19+ <groupId >com.google.guava</groupId >
20+ <artifactId >guava</artifactId >
21+ <version >32.1.3-jre</version >
22+ </dependency >
23+ </dependencies >
24+
25+ </project >
Original file line number Diff line number Diff line change 1+ package ru .nsu .gunko .topic10 .task3 ;
2+
3+ import com .google .common .io .Files ;
4+
5+ import java .io .File ;
6+ import java .net .URI ;
7+
8+ public class Main {
9+ public static void main (String [] args ) {
10+ File root = new File (args [0 ]);
11+ URI base = root .toURI ();
12+
13+ for (File entry : Files .fileTraverser ().depthFirstPreOrder (root )) {
14+ String resName = new File (base .relativize (entry .toURI ()).getPath ()).getPath ();
15+ System .out .println (resName );
16+ }
17+ }
18+ }
You can’t perform that action at this time.
0 commit comments