2009/03/28 16:23
CodeIN/Java
흠... File.separator 처럼 만들어주는 메소드이다.
가끔 어떤 플랫폼에서 file path를 가져오면은 제대로 작동하지 않는 경우가 있는데..
그냥 이렇게 해서 사용한다.
private static String changeDivision(String filePath){
// System.out.println("----------------------------------------------changeDivision");
String ret = "";
// System.out.println("filePath : " + filePath);
ret = filePath.replaceAll("\\\\", "/");
// System.out.println("ret : " + ret);
return ret;
}
// System.out.println("----------------------------------------------changeDivision");
String ret = "";
// System.out.println("filePath : " + filePath);
ret = filePath.replaceAll("\\\\", "/");
// System.out.println("ret : " + ret);
return ret;
}
'CodeIN > Java' 카테고리의 다른 글
| jConsole 사용하기 (2) | 2009/07/30 |
|---|---|
| Sun unveils JavaFX apps, Photo Flocker, Movie Cloud (1) | 2009/05/28 |
| [java] File.separator (0) | 2009/03/28 |
| [ant] ant (0) | 2009/03/20 |
| [java] toString() (0) | 2009/03/20 |
| [java] super / super() 를 사용하는 이유. (0) | 2009/03/20 |


