SHARE
TWEET

Untitled

a guest Apr 26th, 2019 81 Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  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)
RAW Paste Data
We use cookies for various purposes including analytics. By continuing to use Pastebin, you agree to our use of cookies as described in the Cookies Policy. OK, I Understand
 
Top