[Ur] File I/O

Marc Weber marco-oweber at gmx.de
Mon Oct 31 23:58:06 EDT 2011


Excerpts from James Parker's message of Tue Nov 01 02:06:26 +0100 2011:
> I'm currently an undergraduate at the University of Maryland and am
> starting a project using Ur/Web. I was wondering if there was a
> standard library for file reading and writing. I had read previously
> that users were expected to use C FFI for this functionality, but
> perhaps things have changed since then.
Don't think so. Keep in mind that processing requests may be restarted
many times (due to any conditions such as failing DB transactions).
Thus if you write a log this may actually be done many times.
You can work around it by remembering what to store in which file and
writing to disk at the end at commit time. Anyway for that reason you
should think twice about whether files are the right storage if you want
to use the filesystem for storing data.

> One more thing I noticed is I get the following error when including "©" in xml tags:
Looks like its a copy © should show the copyright sign.
> I believe that this should be valid html.
Look at the mailinglist: urweb also allows lot's of invalid HTML. I
wrote about it earlier.

Marc Weber



More information about the Ur mailing list