diff options
Diffstat (limited to 'Master/texmf-dist/source/latex/l3kernel/l3file.dtx')
-rw-r--r-- | Master/texmf-dist/source/latex/l3kernel/l3file.dtx | 34 |
1 files changed, 18 insertions, 16 deletions
diff --git a/Master/texmf-dist/source/latex/l3kernel/l3file.dtx b/Master/texmf-dist/source/latex/l3kernel/l3file.dtx index 2c9210f8d76..a6a43277ac0 100644 --- a/Master/texmf-dist/source/latex/l3kernel/l3file.dtx +++ b/Master/texmf-dist/source/latex/l3kernel/l3file.dtx @@ -37,7 +37,7 @@ \documentclass[full]{l3doc} %</driver> %<*driver|package> -\GetIdInfo$Id: l3file.dtx 4890 2014-05-26 20:59:31Z joseph $ +\GetIdInfo$Id: l3file.dtx 5188 2014-07-09 12:02:22Z will $ {L3 File and I/O operations} %</driver|package> %<*driver> @@ -318,7 +318,7 @@ % % \section{Writing to files} % -% \begin{function}[updated = 2012-06-05]{\iow_now:Nn, \iow_now:Nx} +% \begin{function}[updated = 2012-06-05]{\iow_now:Nn, \iow_now:Nx, \iow_now:cn, \iow_now:cx} % \begin{syntax} % \cs{iow_now:Nn} \meta{stream} \Arg{tokens} % \end{syntax} @@ -343,7 +343,7 @@ % file immediately: it is a dedicated version of \cs{iow_now:Nn}. % \end{function} % -% \begin{function}{\iow_shipout:Nn, \iow_shipout:Nx} +% \begin{function}{\iow_shipout:Nn, \iow_shipout:Nx, \iow_shipout:cn, \iow_shipout:cx} % \begin{syntax} % \cs{iow_shipout:Nn} \meta{stream} \Arg{tokens} % \end{syntax} @@ -355,7 +355,7 @@ % (\emph{cf.}~\cs{iow_shipout_x:Nn}). % \end{function} % -% \begin{function}[updated = 2012-09-08]{\iow_shipout_x:Nn, \iow_shipout_x:Nx} +% \begin{function}[updated = 2012-09-08]{\iow_shipout_x:Nn, \iow_shipout_x:Nx, \iow_shipout_x:cn, \iow_shipout_x:cx} % \begin{syntax} % \cs{iow_shipout_x:Nn} \meta{stream} \Arg{tokens} % \end{syntax} @@ -506,7 +506,10 @@ % \end{variable} % % \begin{variable}{\l__file_internal_name_tl} -% Used to return the full name of a file for internal use. +% Used to return the full name of a file for internal use. This is +% set by \cs{file_if_exist:n(TF)} and \cs{__file_if_exist:nT}, and +% the value may then be used to load a file directly provided no +% further operations intervene. % \end{variable} % % \begin{function}[added = 2012-02-09]{\__file_name_sanitize:nn} @@ -772,18 +775,17 @@ { \@@_input:V \l_@@_internal_name_tl } } % \end{macrocode} -% This code is spun out as a separate function so it is available -% for other kernel file operations which have the same logic. +% This code is spun out as a separate function to encapsulate the +% error message into a easy-to-reuse form. % \begin{macrocode} \cs_new_protected:Npn \@@_if_exist:nT #1#2 { - \file_add_path:nN {#1} \l_@@_internal_name_tl - \quark_if_no_value:NTF \l_@@_internal_name_tl + \file_if_exist:nTF {#1} + {#2} { \@@_name_sanitize:nn {#1} { \__msg_kernel_error:nnx { kernel } { file-not-found } } } - { #2 } } \cs_new_protected:Npn \@@_input:n #1 { @@ -1265,28 +1267,28 @@ % % \subsubsection{Deferred writing} % -% \begin{macro}{\iow_shipout_x:Nn, \iow_shipout_x:Nx} +% \begin{macro}{\iow_shipout_x:Nn, \iow_shipout_x:Nx, \iow_shipout_x:cn, \iow_shipout_x:cx} % First the easy part, this is the primitive, which expects its % argument to be braced. % \begin{macrocode} \cs_new_protected:Npn \iow_shipout_x:Nn #1#2 { \tex_write:D #1 {#2} } -\cs_generate_variant:Nn \iow_shipout_x:Nn { Nx } +\cs_generate_variant:Nn \iow_shipout_x:Nn { c, Nx, cx } % \end{macrocode} % \end{macro} % -% \begin{macro}{\iow_shipout:Nn, \iow_shipout:Nx} +% \begin{macro}{\iow_shipout:Nn, \iow_shipout:Nx, \iow_shipout:cn, \iow_shipout:cx} % With \eTeX{} available deferred writing without expansion is easy. % \begin{macrocode} \cs_new_protected:Npn \iow_shipout:Nn #1#2 { \tex_write:D #1 { \exp_not:n {#2} } } -\cs_generate_variant:Nn \iow_shipout:Nn { Nx } +\cs_generate_variant:Nn \iow_shipout:Nn { c, Nx, cx } % \end{macrocode} % \end{macro} % % \subsubsection{Immediate writing} % -% \begin{macro}{\iow_now:Nn, \iow_now:Nx} +% \begin{macro}{\iow_now:Nn,\iow_now:Nx,\iow_now:cn,\iow_now:cx} % This routine writes the second argument onto the output stream without % expansion. If this stream isn't open, the output goes to the terminal % instead. If the first argument is no output stream at all, we get an @@ -1297,7 +1299,7 @@ % \begin{macrocode} \cs_new_protected:Npn \iow_now:Nn #1#2 { \tex_immediate:D \tex_write:D #1 { \exp_not:n {#2} } } -\cs_generate_variant:Nn \iow_now:Nn { Nx } +\cs_generate_variant:Nn \iow_now:Nn { c, Nx, cx } % \end{macrocode} % \end{macro} % |