%%
%% This is file `texosquery.tex',
%% generated with the docstrip utility.
%%
%% The original source files were:
%%
%% texosquery.dtx  (with options: `texosquery.tex,package')
%% 
%%  texosquery
%%  Copyright 2016 Nicola Talbot
%% 
%%  This work may be distributed and/or modified under the
%%  conditions of the LaTeX Project Public License, either version 1.3
%%  of this license of (at your option) any later version.
%%  The latest version of this license is in
%%    http://www.latex-project.org/lppl.txt
%%  and version 1.3 or later is part of all distributions of LaTeX
%%  version 2005/12/01 or later.
%% 
%%  This work has the LPPL maintenance status `maintained'.
%% 
%%  The Current Maintainer of this work is Nicola Talbot.
%% 
%%  This work consists of the files texosquery.dtx and texosquery.ins
%%  and the derived files texosquery.sty, texosquery.tex.
%%  Additionally, the Java application texosquery.jar and bash script
%%  texosquery
%% \CharacterTable
%%  {Upper-case    \A\B\C\D\E\F\G\H\I\J\K\L\M\N\O\P\Q\R\S\T\U\V\W\X\Y\Z
%%   Lower-case    \a\b\c\d\e\f\g\h\i\j\k\l\m\n\o\p\q\r\s\t\u\v\w\x\y\z
%%   Digits        \0\1\2\3\4\5\6\7\8\9
%%   Exclamation   \!     Double quote  \"     Hash (number) \#
%%   Dollar        \$     Percent       \%     Ampersand     \&
%%   Acute accent  \'     Left paren    \(     Right paren   \)
%%   Asterisk      \*     Plus          \+     Comma         \,
%%   Minus         \-     Point         \.     Solidus       \/
%%   Colon         \:     Semicolon     \;     Less than     \<
%%   Equals        \=     Greater than  \>     Question mark \?
%%   Commercial at \@     Left bracket  \[     Backslash     \\
%%   Right bracket \]     Circumflex    \^     Underscore    \_
%%   Grave accent  \`     Left brace    \{     Vertical bar  \|
%%   Right brace   \}     Tilde         \~}
\ifnum\catcode`\@=11\relax
  \def\@texosquery@restore@at{}%
\else
  \expandafter\edef\csname @texosquery@restore@at\endcsname{%
    \noexpand\catcode`\noexpand\@=\number\catcode`\@\relax
  }%
 \catcode`\@=11\relax
\fi
\ifx\TeXOSQuery\undefined
\else
  \@texosquery@restore@at
  \expandafter\endinput
\fi
\def\TeXOSInvokerName{texosquery}
\ifx\@@input\undefined
  \def\TeXOSQueryInvoker#1{\input|"\TeXOSInvokerName\space#1" }
\else
  \def\TeXOSQueryInvoker#1{\@@input|"\TeXOSInvokerName\space#1" }
\fi
\newif\ifTeXOSQueryDryRun
\TeXOSQueryDryRuntrue
\ifx\shellescape\undefined
  \ifx\pdfshellescape\undefined
  \else
    \ifnum\pdfshellescape=1\relax
      \TeXOSQueryDryRunfalse
    \fi
  \fi
\else
  \ifnum\shellescape=1\relax
    \TeXOSQueryDryRunfalse
  \fi
\fi
\def\TeXOSQuery#1#2{%
  \ifTeXOSQueryDryRun
    \begingroup
      \newlinechar=`\^^J
      \message{^^JTeXOSQuery: \TeXOSInvokerName\space#2^^J}%
    \endgroup
    \def#1{}%
  \else
    \begingroup
    \endlinechar=-1\relax
    \catcode`\-=12\relax
    \catcode`\_=12\relax
    \catcode`\^=12\relax
    \catcode`\~=12\relax
    \catcode`\$=12\relax
    \catcode`\&=12\relax
    \catcode`\"=12\relax
    \catcode`\'=12\relax
    \catcode`\.=12\relax
    \catcode`\/=12\relax
    \catcode`\:=12\relax
    \catcode`\;=12\relax
    \catcode`\%=12\relax
    \everyeof{\noexpand}\relax
    \edef\x{\endgroup\def\noexpand#1{\TeXOSQueryInvoker{#2}}}\x
  \fi
}
\def\TeXOSQueryLocale#1{\TeXOSQuery{#1}{\string-l}}
\def\TeXOSQueryCwd#1{\TeXOSQuery{#1}{\string-c}}
\def\TeXOSQueryHome#1{\TeXOSQuery{#1}{\string-m}}
\def\TeXOSQueryTmpDir#1{\TeXOSQuery{#1}{\string-t}}
\def\TeXOSQueryVersion#1{\TeXOSQuery{#1}{\string-r}}
\def\TeXOSQueryArch#1{\TeXOSQuery{#1}{\string-a}}
\def\TeXOSQueryName#1{\TeXOSQuery{#1}{\string-o}}
\def\TeXOSQueryNow#1{%
  \edef\@texosquery@restore@D{%
    \noexpand\catcode`\noexpand\D=\the\catcode`\D\relax}%
  \catcode`\D=12\relax
  \TeXOSQuery{#1}{\string-n}%
  \@texosquery@restore@D
}
\def\texosquerystripquotes#1{%
  \@texosquery@stripquotes#1\@mid@texosquery@stripquotes
    "\relax"\relax\@end@texosquery@stripquotes
}
\def\@texosquery@stripquotes#1"#2"{%
  \@@texosquery@stripquotes#1#2%
}
\def\@@texosquery@stripquotes#1\@mid@texosquery@stripquotes#2\@end@texosquery@stripquotes{%
  #1%
}
\def\TeXOSQueryFileDate#1#2{%
  \edef\@texosquery@restore@D{%
    \noexpand\catcode`\noexpand\D=\the\catcode`\D\relax}%
  \catcode`\D=12\relax
  \TeXOSQuery{#1}{\string-d \string'\texosquerystripquotes{#2}\string'}%
  \@texosquery@restore@D
}
\def\TeXOSQueryFileSize#1#2{\TeXOSQuery{#1}{\string-s
 \string'\texosquerystripquotes{#2}\string'}}
\def\TeXOSQueryFileList#1#2#3{\TeXOSQuery{#1}{%
 \string-i \string'#2\string'
 \string'\texosquerystripquotes{#3}\string'}}
\def\TeXOSQueryFilterFileList#1#2#3#4{\TeXOSQuery{#1}{%
 \string-f \string'#2\string' \string'#3\string'
 \string'\texosquerystripquotes{#4}\string'}}
\def\TeXOSQueryFileURI#1#2{\TeXOSQuery{#1}{\string-u
 \string'\texosquerystripquotes{#2}\string'}}
\def\TeXOSQueryFilePath#1#2{\TeXOSQuery{#1}{\string-p
 \string'\texosquerystripquotes{#2}\string'}}
\def\TeXOSQueryDirName#1#2{\TeXOSQuery{#1}{\string-e
 \string'\texosquerystripquotes{#2}\string'}}
\@texosquery@restore@at
\endinput
%%
%% End of file `texosquery.tex'.
