Gabriel Petrovay has proposed merging 
lp:~gabipetrovay/zorba/expath_file_added_missing_write-2 into lp:zorba.

Requested reviews:
  Gabriel Petrovay (gabipetrovay)
  Matthias Brantner (matthias-brantner)

For more details, see:
https://code.launchpad.net/~gabipetrovay/zorba/expath_file_added_missing_write-2/+merge/79395

Added the missing write#2 function to the EXPath file API.
-- 
https://code.launchpad.net/~gabipetrovay/zorba/expath_file_added_missing_write-2/+merge/79395
Your team Zorba Coders is subscribed to branch lp:zorba.
=== modified file 'modules/org/expath/ns/file.xq'
--- modules/org/expath/ns/file.xq	2011-08-17 23:28:19 +0000
+++ modules/org/expath/ns/file.xq	2011-10-14 11:57:26 +0000
@@ -486,6 +486,26 @@
 };
 
 (:~
+ : Writes a sequence of items to a file.
+ :
+ : The operation is equivalent to calling:
+ : <pre>file:write($file, $content, ())</pre>.
+ :
+ : @param $file The path/URI of the file to write the content to.
+ : @param $content The content to be serialized to the file.
+ : @return The empty sequence.
+ : @error file:FOFL0004 If <pre>$file</pre> points to a directory.
+ : @error file:FOFL9999 If any other error occurs.
+ :)
+declare %ann:sequential function file:write(
+  $file as xs:string,
+  $content as item()*
+) as empty-sequence()
+{
+  file:write-text($file, fn:serialize($content))
+};
+
+(:~
  : Writes a sequence of Base64 items as binary to a file.
  :
  : The operation is equivalent to calling:

-- 
Mailing list: https://launchpad.net/~zorba-coders
Post to     : zorba-coders@lists.launchpad.net
Unsubscribe : https://launchpad.net/~zorba-coders
More help   : https://help.launchpad.net/ListHelp

Reply via email to