문서의 선택한 두 판 사이의 차이를 보여줍니다.
| 양쪽 이전 판 이전 판 다음 판 | 이전 판 | ||
|
groovy:file [2013/05/17 14:30] kwon37xi |
groovy:file [2019/03/07 11:15] (현재) kwon37xi |
||
|---|---|---|---|
| 줄 4: | 줄 4: | ||
| * [[http:// | * [[http:// | ||
| + | |||
| + | ===== 파일 이름 ===== | ||
| + | * [[http:// | ||
| + | file.name.replaceFirst(~/ | ||
| + | </ | ||
| ===== 텍스트 파일 ===== | ===== 텍스트 파일 ===== | ||
| <code groovy> | <code groovy> | ||
| 줄 34: | 줄 39: | ||
| List movies = filesbyExt(' | List movies = filesbyExt(' | ||
| </ | </ | ||
| - | * Groovy 스럽게 바꾸면 | + | * Groovy 스럽게 바꾸면 [[http:// |
| def filesByExt(ext) { | def filesByExt(ext) { | ||
| new File(' | new File(' | ||
| } | } | ||
| </ | </ | ||
| + | ==== 현재 디렉토리의 동영상 파일을 E?? 에 따라 이름 줄이기 ==== | ||
| + | 현재 디렉토리에 '' | ||
| + | <code groovy> | ||
| + | new File(' | ||
| + | </ | ||
| + | |||
| + | ===== 참조 ===== | ||
| + | * [[https:// | ||