250x250
Notice
Recent Posts
Recent Comments
| 일 | 월 | 화 | 수 | 목 | 금 | 토 |
|---|---|---|---|---|---|---|
| 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
- JDBC
- error
- Exception
- Core Java
- 문서
- IntelliJ
- spring
- PostgreSQL
- Open Source
- myBatis
- jpa
- MySQL
- STS
- oracle
- Eclipse
- 설정
- Spring Boot
- Docker
- 오픈소스
- Source
- git
- ubuntu
- Python
- AJAX
- Tomcat
- MSSQL
- JavaScript
- Thymeleaf
- maven
- SpringBoot
Archives
- Today
- Total
헤르메스 LIFE
[Source] CVS 폴더 삭제 본문
728x90
프로젝트는 이제 대부분 Eclipse를 사용하게 됩니다. 다른 프로젝트를 하다가 그 프레임워크를 그대로 옮겨와서 사용하게 되는 경우 CVS를 사용하게 되면 그 이하의 폴더까지 옮겨 오게 되고
CVS 폴더의 환경자체가 이동되어 귀찮은 작업을 할 경우가 있습니다.
이 때 CVS의 폴더를 완전히 삭제하고 새롭게 CVS나 SVN에 연결하기 위해 만들었습니다.
CVS 폴더의 환경자체가 이동되어 귀찮은 작업을 할 경우가 있습니다.
이 때 CVS의 폴더를 완전히 삭제하고 새롭게 CVS나 SVN에 연결하기 위해 만들었습니다.
package cruise.util;
import java.io.File;
public class DeleteCVSFolder {
public static void main(String[] args) throws Exception {
File srcDir = new File("C:\\project\\workspace"); // Workspace 폴더
findCVSDir(srcDir);
System.out.print("Finish Delete Folder......");
System.exit(-1);
}
public static void findCVSDir(File srcDir) throws Exception {
if (!srcDir.exists()) {
System.out.println("workspace not found : " + srcDir.getCanonicalPath());
System.exit(-1);
}
File[] files = srcDir.listFiles();
for (int i = 0; i < files.length; i++) {
if (files[i].isDirectory() && !files[i].getName().equals("CVS")) {
findCVSDir(files[i]);
} else if (files[i].isDirectory() && files[i].getName().equals("CVS")) {
deleteFolder(files[i]);
}
}
}
public static void deleteFolder(File srcFolder) {
File[] files = srcFolder.listFiles();
System.out.println(srcFolder.getAbsolutePath());
for (int i = 0; i < files.length; i++) {
System.out.println(files[i].getName());
files[i].delete();
}
srcFolder.delete();
}
}
728x90
'Core Java' 카테고리의 다른 글
| [Source] Unicode 2.0 을 Unicode 1.2 로 변환 (0) | 2010.10.20 |
|---|---|
| [Source] Character Set Conversion (0) | 2010.10.20 |
| [Source] String to Unicode (0) | 2010.10.20 |
| [Source] Unicode To String (0) | 2010.10.20 |
| [Source] FTP Client Source (0) | 2010.07.30 |