This is the mail archive of the kawa@sourceware.org mailing list for the Kawa project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

problem with file io in kawa-1.9.1


Hello Kawa users,

I have run into an issue with file io operations in Kawa.  It appears that the 
path strings I'm passing to various file io functions are creating an 
instance of the gnu.text.FilePath type and passing a value of that type to 
Java functions which are expecting java.io.File types.  Am I passing the 
wrong kind of arguments?  I've pasted a sample interaction below.

#|kawa:2|# (create-directory "/home/john/mytest")
Argument #1 (/home/john/mytest) to 'java.io.File.mkdir()' has wrong type 
(gnu.text.FilePath) (gnu.text.FilePath cannot be cast to java.io.File)
	at kawa.lib.files.createDirectory(files.scm:100)
	at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
	at 
sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
	at 
sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
	at java.lang.reflect.Method.invoke(Method.java:597)
	at gnu.expr.PrimProcedure.apply(PrimProcedure.java:251)
	at gnu.mapping.CallContext.runUntilDone(CallContext.java:251)
	at gnu.expr.ModuleExp.evalModule(ModuleExp.java:296)
	at kawa.Shell.run(Shell.java:230)
	at kawa.Shell.run(Shell.java:172)
	at kawa.Shell.run(Shell.java:159)
	at kawa.repl.main(repl.java:844)
Caused by: java.lang.ClassCastException: gnu.text.FilePath cannot be cast to 
java.io.File
	at kawa.lib.files.createDirectory(files.scm:99)
	... 11 more


Thanks,

John Whittaker


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]