extensions maybe?
Binary is suppose to be .dat
Test is .txt or .text
server_crash
Postaholic
2,111 posts since Jun 2004
Reputation Points: 113
Solved Threads: 20
Every file is binary data by definition.
A text file contains only data in the specific code page/character set you're using. Which that is would depend on your locale.
You'd have to attempt to read the file and throw an exception if you encounter data that doesn't map to text in your expected codepage.
jwenting
duckman
8,392 posts since Nov 2004
Reputation Points: 1,662
Solved Threads: 337
Use a file filter. I think there's an accept() method that you can provide a default extension in, but not sure.
server_crash
Postaholic
2,111 posts since Jun 2004
Reputation Points: 113
Solved Threads: 20