Notice
Recent Posts
Recent Comments
Link
일 | 월 | 화 | 수 | 목 | 금 | 토 |
---|---|---|---|---|---|---|
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 |
Tags
- ubuntu
- github
- goland
- 데이터전달
- 제어반전
- 알고리즘
- 데이터
- Jenknis
- 두 동전
- git
- insert
- 17837
- 16197
- IntelliJ
- intent
- Java
- 백준
- mysql
- data
- activity
- 단축키
- Android
- spring
- broadcastreceiver
- 프로그래머스
- 큐빙
- vscode
- service
- 안드로이드
- Algorithm
Archives
- Today
- Total
목록디렉토리 조회 (1)
해보자

ls명령어 ls 명령을 실행하면 현재 디렉토리에 있는 파일 목록을 출력한다. 소스코드 1 2 3 4 5 6 7 8 9 10 11 12 import java.io.File; public class DirectoryList { public static void main(String[] args) { // 1. ls명령어 String path = System.getProperty("user.dir") ; // 현재 프로젝트 파일 디렉토리 경로 File file = new File(path); String[] strs = file.list(); for(String str : strs) System.out.println(str); } } Colored by Color Scripter cs 결과 : ls -F 명령..
Java
2020. 7. 22. 17:34