Update.
This commit is contained in:
+15
@@ -0,0 +1,15 @@
|
||||
// retoor <retoor@molodetz.nl>
|
||||
|
||||
import "tempfile" for TemporaryDirectory
|
||||
import "pathlib" for Path
|
||||
|
||||
var tmp = TemporaryDirectory.new()
|
||||
System.print(tmp.name is String) // expect: true
|
||||
System.print(Path.new(tmp.name).exists()) // expect: true
|
||||
System.print(Path.new(tmp.name).isDir()) // expect: true
|
||||
System.print(tmp.closed) // expect: false
|
||||
System.print(tmp.delete) // expect: true
|
||||
|
||||
tmp.cleanup()
|
||||
System.print(tmp.closed) // expect: true
|
||||
System.print(Path.new(tmp.name).exists()) // expect: false
|
||||
Reference in New Issue
Block a user