Advertisement
Guest User

Untitled

a guest
Apr 26th, 2019
117
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.37 KB | None | 0 0
  1.  
  2. class DirList extends DefaultTask {
  3. @Input
  4. String path
  5. File dh
  6.  
  7. @Option(option = 'fileSet', description = 'Set the filename of the directory')
  8. void setDir(final String path) {
  9. this.path = path
  10. }
  11.  
  12. @TaskAction
  13. def list() {
  14. dh = new File(this.path)
  15. dh.eachFile {
  16. println(it)
  17. }
  18. }
  19. }
  20.  
  21. task list(type: DirList)
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement