如果静态声明,如何动态传递布尔值?

时间:2018-04-16 14:04:49

标签: groovy filemaker

此行“boolean skipfolders = false”如何为用户动态传递提供便利 无论是真还是假。

    start(true) // here is it pass value dynamically like user,pass parameters
    def start(boolean skip){

            def store  
            boolean  skipfolders = skip;  
            def ftpClient = new FTPClient()
            ftpClient.connect(server)
            ftpClient.login(user,pass)
            ftpClient.enterLocalPassiveMode()
            FTPFile[] fileslist = ftpClient.listFiles("/")
            FTPFile[] folderfileslist = ftpClient.listFiles("/sample")

           if(!skipfolders){}      
    }

提前致谢

0 个答案:

没有答案