Ticket #2260
The docs for File.copyTo(...) say:
File.copyTo(...)
The overwrite option can also be a function of type |File f->Bool| which is passed every destination file to be overwritten.
which is good and what you want. But the overwrite func seems to be passed the source file instead:
class Example { Void main() { tempFile := File.createTemp.deleteOnExit podFile := Env.cur.homeDir + `lib/fan/sys.pod` podFile.copyTo(tempFile, ["overwrite": |File file -> Bool| { echo(file.normalize.osPath) // --> C:\Apps\fantom-1.0.66\lib\fan\sys.pod return false }]) } }
Promoted to ticket #2260 and assigned to brian
Good catch - I will fix next week
Gee, I've just prompted 3 tickets in the past week... Cool, I feel like I'm back on form! : )
Ticket resolved in 1.0.67
https://bitbucket.org/fantom/fan-1.0/commits/598a2e8739d3ebd1819febb9e1b67a6dbb3ca98e
Login or Signup to reply.
SlimerDude Sun 13 Apr 2014
The docs for
File.copyTo(...)
say:which is good and what you want. But the overwrite func seems to be passed the source file instead:
brian Sun 13 Apr 2014
Promoted to ticket #2260 and assigned to brian
Good catch - I will fix next week
SlimerDude Sun 13 Apr 2014
Gee, I've just prompted 3 tickets in the past week... Cool, I feel like I'm back on form! : )
brian Wed 23 Apr 2014
Ticket resolved in 1.0.67
https://bitbucket.org/fantom/fan-1.0/commits/598a2e8739d3ebd1819febb9e1b67a6dbb3ca98e