.. include:: ../global.rst File Handling ^^^^^^^^^^^^^ .. _`delete-file`: .. idio:function:: delete-file filename does `remove (filename)` succeed? :param filename: file to delete :type filename: string :return: ``#t`` on success :raises ^i/o-filename-error: if `filename` contains an ASCII NUL :raises ^file-handle-error: .. _`call-with-input-file`: .. idio:function:: call-with-input-file file proc return the result of calling `proc` with a file handle open to `file` for input :param file: file name :type file: string :param proc: function of 1 argument :type proc: function :return: result of calling `proc` :rtype: any .. _`call-with-output-file`: .. idio:function:: call-with-output-file file proc return the result of calling `proc` with a file handle open to `file` for output :param file: file name :type file: string :param proc: function of 1 argument :type proc: function :return: result of calling `proc` :rtype: any .. _`with-input-from-file`: .. idio:function:: with-input-from-file file thunk return the result of calling `thunk` in the context of the current input handle being a file handle open to `file` for input :param file: file name :type file: string :param thunk: function of 0 arguments :type thunk: function :return: result of calling `thunk` :rtype: any .. _`with-output-to-file`: .. idio:function:: with-output-to-file file thunk return the result of calling `thunk` in the context of the current output handle being a file handle open to `file` for output :param file: file name :type file: string :param thunk: function of 0 arguments :type thunk: function :return: result of calling `thunk` :rtype: any .. include:: ../commit.rst