본문 바로가기
JAVA

11일차//[java] file 조사

by aesup 2021. 1. 25.
728x90

1. file 조사 가능

 

File file = new File("c:\\");

 

-> file

 

 



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
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
import java.io.File;
 
public class StudyFile {
    public static void main(String[] args) {
        //file : 저장매체 기능
        
        
        
        
        File file = new File("c:\\");
         
         //파일 조사
         String filelist[] = file.list();
         
         for (int i = 0; i < filelist.length; i++) {
            System.out.println(filelist[i]);
    }
    }
}
 
-
$Recycle.Bin
$WinREAgent
.rnd
@$bfyNi
agentlog.txt
Documents and Settings
DumpStack.log.tmp
eclipse-jee-2019-12-R-win32-x86_64
HandySoft
hiberfil.sys
Intel
MSOCache
pagefile.sys
PerfLogs
Program Files
Program Files (x86)
ProgramData
Recovery
Riot Games
swapfile.sys
System Volume Information
Temp
tmp
tmp1
Users
Windows
 
cs

 

 

 

728x90