2012-04-13 3 views
0

다른 유형의 파일을 저장하기 위해 sdcard에 폴더를 만들었습니다.안드로이드에서 sdcard에있는 폴더의 파일을 표시하는 방법은 무엇입니까?

이제 애플리케이션 아이콘을 클릭하면 모든 파일을 표시하면됩니다.

누구든지 정확한 소스 코드를 제공 할 수 있습니까?

긴급 !!

미리 감사드립니다.

+0

파일 관리자를 만드는 방법 구글에 검색합니다 ... 폴더의 모든 파일을 제공 : P –

답변

0

목록을 원하십니까?

File directory = getMyDirectory(); // do this however you want 
File[] files = directory.listFiles(); // gets an array of files in the dir. 
0
public void directoryPath(File path) { 
     // TODO Auto-generated method stub 
     if(path.exists()) { 
      File[] files = path.listFiles(); 
      for(int i=0; i<files.length; i++) { 
       //you can do what you want here 
      } 
     } 
    } 

위의 코드는

관련 문제