chapel-lang/chapel — pull request #185 by lydia-duncan (2014-08-21 18:57:56+00:00)
Title: Add file rename functionality and tests

Add the function renameFile to our IO module, as both an error generating
and an error returning function. This is supported by new qio runtime code
that makes use of the C function "rename".

Summary of changes:
modules/standard/IO.chpl - renameFile(err, oldname, newname) converts
oldname and newname to c_strings before sending them to qio_file_rename,
returning via err any error that may have occurred. renameFile(oldname,
newname) passes its arguments along to its sister function, and generates
an I/O error if one occurred.
runtime/include/qio/qio.h
runtime/src/qio/qio.c - adds qio_file_rename to qio. This method sends its
arguments to rename and returns the qioerr version of errno if an error
occurred.
test/io/lydia/rename/no_such_file - checks that the proper error is generated
if the file to move did not exist.
test/io/lydia/rename/rename_file - checks that files are actually moved.