First, you cannot directly write a client-side file in JavaScript.
The primary design goal of the HTML file input widget is for the user
to select a file, which is then uploaded to a servlet for processing
on the server. For a high level overview of the process, search this
forum for fileupload, for example:
http://groups.google.com/group/google-web-toolkit/browse_thread/thread/cfe1a1feaa1b345d/935ce4db15ee537c
Second, the c:\fakepath\ thing is a security feature, originally
implemented in Opera and IE8, but now an official W3C standard. You
can read the background here:
http://blogs.msdn.com/b/ie/archive/2009/03/20/rtm-platform-changes.aspx
http://www.w3.org/TR/html5/number-state.html#file-upload-state
You might also want to review the File API, which allows for client-
side reading (not writing) of files selected by the user in a
fileupload widget.
http://www.w3.org/TR/FileAPI/
https://developer.mozilla.org/en/using_files_from_web_applications
If your ultimate goal is to deliver a file to the client, you'll need
to get there in a roundabout way, by making the file available for the
user to download:
http://groups.google.com/group/google-web-toolkit/browse_thread/thread/8c708ac2da186d17/ca92d9d8f78a0e19