deleteRecursively behavior

27 views
Skip to first unread message

4e6

unread,
Apr 1, 2012, 1:27:38 PM4/1/12
to scala-i...@googlegroups.com
Just a quick question. Is it expected behavior when deleteRecursively returns 1 file deleted on non-existent Path?

scala> val imaginary = Path.fromString("/tmp/foo/bar")
imaginary: scalax.file.Path = Path(/tmp/foo/bar)

scala> imaginary.exists
res0: Boolean = false

scala> val (deleted, remaining) = imaginary.deleteRecursively()
deleted: Int = 1
remaining: Int = 0


Jesse Eichar

unread,
Apr 3, 2012, 4:00:03 AM4/3/12
to scala-i...@googlegroups.com
That does indeed seem like a bug.  It should return 0 and 0.  I don't think I check for the case where imaginary does not exist.  I will create a ticket for this.

Jesse
Reply all
Reply to author
Forward
0 new messages