func init // adds using namespace sys.add_use('System.IO') sys.add_use('System.Collections.Generic') // initialize instance if(linked("Collection")) sys.add_var(this.name, 'IEnumerable') end if(linked("onError")) this.setfield('ex', 'ex' + this.id) end end func doEnumerateDirectories(data) linked("onError") ? blk.println('try {').inc() : '' if(linked("Collection")) blk.println(this.codename, ' = Directory.EnumerateDirectories(', d("Path"), ');') event("onEnumerateDirectories", this.codename) else event("onEnumerateDirectories", 'Directory.EnumerateDirectories(' + d("Path") + ')') end if(linked("onError")) blk.dec().println('} catch (Exception ', this.ex, ') {').inc() event("onError", this.ex + '.Message') blk.dec().println('}') end end func doEnumerateDirectories2(data) linked("onError") ? blk.println('try {').inc() : '' if(linked("Collection")) blk.println(this.codename, ' = Directory.EnumerateDirectories(', d("Path"), ', ', d("SearchPattern"), ');') event("onEnumerateDirectories", this.codename) else event("onEnumerateDirectories", 'Directory.EnumerateDirectories(' + d("Path") + ', ' + d("SearchPattern") + ')') end if(linked("onError")) blk.dec().println('} catch (Exception ', this.ex, ') {').inc() event("onError", this.ex + '.Message') blk.dec().println('}') end end func doEnumerateDirectories3(data) linked("onError") ? blk.println('try {').inc() : '' if(linked("Collection")) blk.println(this.codename, ' = Directory.EnumerateDirectories(', d("Path"), ', ', d("SearchPattern"), ', ', (isdef("SearchOption") ? d("SearchOption") : sys.get_undef_manager("SearchOption")), ');') event("onEnumerateDirectories", this.codename) else event("onEnumerateDirectories", 'Directory.EnumerateDirectories(' + d("Path") + ', ' + d("SearchPattern") + ', ' + (isdef("SearchOption") ? (isdef("SearchOption") ? (isdef("SearchOption") ? d("SearchOption") : sys.get_undef_manager("SearchOption")) : sys.get_undef_manager("SearchOption")) : sys.get_undef_manager("SearchOption")) + ')') end if(linked("onError")) blk.dec().println('} catch (Exception ', this.ex, ') {').inc() event("onError", this.ex + '.Message') blk.dec().println('}') end end func doEnumerateFiles(data) linked("onError") ? blk.println('try {').inc() : '' if(linked("Collection")) blk.println(this.codename, ' = Directory.EnumerateFiles(', d("Path"), ');') event("onEnumerateFiles", this.codename) else event("onEnumerateFiles", 'Directory.EnumerateFiles(' + d("Path") + ')') end if(linked("onError")) blk.dec().println('} catch (Exception ', this.ex, ') {').inc() event("onError", this.ex + '.Message') blk.dec().println('}') end end func doEnumerateFiles2(data) linked("onError") ? blk.println('try {').inc() : '' if(linked("Collection")) blk.println(this.codename, ' = Directory.EnumerateFiles(', d("Path"), ', ', d("SearchPattern"), ');') event("onEnumerateFiles", this.codename) else event("onEnumerateFiles", 'Directory.EnumerateFiles(' + d("Path") + ', ' + d("SearchPattern") + ')') end if(linked("onError")) blk.dec().println('} catch (Exception ', this.ex, ') {').inc() event("onError", this.ex + '.Message') blk.dec().println('}') end end func doEnumerateFiles3(data) linked("onError") ? blk.println('try {').inc() : '' if(linked("Collection")) blk.println(this.codename, ' = Directory.EnumerateFiles(', d("Path"), ', ', d("SearchPattern"), ', ', (isdef("SearchOption") ? d("SearchOption") : sys.get_undef_manager("SearchOption")), ');') event("onEnumerateFiles", this.codename) else event("onEnumerateFiles", 'Directory.EnumerateFiles(' + d("Path") + ', ' + d("SearchPattern") + ', ' + (isdef("SearchOption") ? (isdef("SearchOption") ? d("SearchOption") : sys.get_undef_manager("SearchOption")) : sys.get_undef_manager("SearchOption")) + ')') end if(linked("onError")) blk.dec().println('} catch (Exception ', this.ex, ') {').inc() event("onError", this.ex + '.Message') blk.dec().println('}') end end func doEnumerateFileSystemEntries(data) linked("onError") ? blk.println('try {').inc() : '' if(linked("Collection")) blk.println(this.codename, ' = Directory.EnumerateFileSystemEntries(', d("Path"), ');') event("onEnumerateFileSystemEntries", this.codename) else event("onEnumerateFileSystemEntries", 'Directory.EnumerateFileSystemEntries(' + d("Path") + ')') end if(linked("onError")) blk.dec().println('} catch (Exception ', this.ex, ') {').inc() event("onError", this.ex + '.Message') blk.dec().println('}') end end func doEnumerateFileSystemEntries2(data) linked("onError") ? blk.println('try {').inc() : '' if(linked("Collection")) blk.println(this.codename, ' = Directory.EnumerateFileSystemEntries(', d("Path"), ', ', d("SearchPattern"), ');') event("onEnumerateFileSystemEntries", this.codename) else event("onEnumerateFileSystemEntries", 'Directory.EnumerateFileSystemEntries(' + d("Path") + ', ' + d("SearchPattern") + ')') end if(linked("onError")) blk.dec().println('} catch (Exception ', this.ex, ') {').inc() event("onError", this.ex + '.Message') blk.dec().println('}') end end func doEnumerateFileSystemEntries3(data) linked("onError") ? blk.println('try {').inc() : '' if(linked("Collection")) blk.println(this.codename, ' = Directory.EnumerateFileSystemEntries(', d("Path"), ', ', d("SearchPattern"), ', ', (isdef("SearchOption") ? d("SearchOption") : sys.get_undef_manager("SearchOption")), ');') event("onEnumerateFileSystemEntries", this.codename) else event("onEnumerateFileSystemEntries", 'Directory.EnumerateFileSystemEntries(' + d("Path") + ', ' + d("SearchPattern") + ', ' + (isdef("SearchOption") ? (isdef("SearchOption") ? d("SearchOption") : sys.get_undef_manager("SearchOption")) : sys.get_undef_manager("SearchOption")) + ')') end if(linked("onError")) blk.dec().println('} catch (Exception ', this.ex, ') {').inc() event("onError", this.ex + '.Message') blk.dec().println('}') end end func Collection return(this.codename) end