From: Kenneth Wolcott <kennethwolcott@gmail.com>
Subject: Using "pure" (?) Ada, how to determine whether a file is a "text" file, not a binary?
Date: Sat, 1 Jul 2023 10:15:25 -0700 (PDT) [thread overview]
Message-ID: <41a5cad2-b5ca-4996-b057-e1ae8b27f526n@googlegroups.com> (raw)
Hi;
Another very beginner question here...
Using "pure" (?) Ada, how to determine whether a file is a "text" file, not a binary?
Kind of like using the UNIX/Linux "file" command, but doesn't have to be comprehensive (yet). Something like the Perl "-T" feature.
On the other hand, if there already exists an Ada implementation of the UNIX "file" command as a library, could you point me to that?
As a side question, how does one read "binary" files in Ada?
A UNIX/Linux use case for the previous sentence is the concatenation of two (or more) "binary" files that were created using the UNIX/Linux "split" command.
So I'd be interested in emulating the UNIX "cat" command for "binary" files.
These are just personal experiments for learning how to do all kinds of Ada I/O...
Thanks,
Ken Wolcott
next reply other threads:[~2023-07-01 17:15 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2023-07-01 17:15 Kenneth Wolcott [this message]
2023-07-01 20:39 ` Using "pure" (?) Ada, how to determine whether a file is a "text" file, not a binary? Jeffrey R.Carter
2023-07-01 20:54 ` Kenneth Wolcott
2023-07-01 21:39 ` Keith Thompson
2023-07-01 21:50 ` Kenneth Wolcott
2023-07-02 1:08 ` Chris Townley
2023-07-02 1:48 ` Kenneth Wolcott
replies disabled
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox