Check that file exists: Difference between revisions

Content added Content deleted
m (→‎{{header|Phix}}: added without js)
(GNU APL example)
Line 285: Line 285:
test directory exists( "docs" );
test directory exists( "docs" );
test directory exists( "\docs" )</lang>
test directory exists( "\docs" )</lang>

=={{header|APL}}==
<lang apl>
h ← ⎕fio['fopen'] 'sampletext-1.txt'
h
7
⎕fio['fstat'] h
66311 821146 33188 1 1000 1000 0 11634 4096 24 1639705930 1639705930 1639705930
⎕fio['fclose'] h
0
h ← ⎕fio['fopen'] 'does_not_exist.txt'
h
¯1
h ← ⎕fio['fopen'] '/'
h
7
⎕fio['fstat'] h
66311 2 16877 30 0 0 0 4096 4096 8 1637724675 1637724710 1637724710
⎕fio['fclose'] h
0
</lang>


=={{header|AppleScript}}==
=={{header|AppleScript}}==