Anonymous user
Check that file exists: Difference between revisions
GP and PARI
(→{{header|Go}}: library changes) |
(GP and PARI) |
||
Line 700:
{Show {Path.exists "/docs"}}
{Show {Path.exists "/input.txt"}}</lang>
{{incomplete|Needs to check directories and the filesystem root.}}
<lang parigp>trap(,"does not exist",read("input.txt");"exists")</lang>
A better version would use <code>externstr</code>.
Under PARI it would typically be more convenient to use [[#C|C]] methods.
=={{header|Pascal}}==
Line 1,037 ⟶ 1,045:
{{omit from|HTML}}
▲{{omit from|PARI/GP}}
{{omit from|TI-83 BASIC|Does not have a filesystem, just namespaced variables.}}
{{omit from|TI-89 BASIC|Does not have a filesystem, just namespaced variables.}}
|