DOS LFN support (was: Paste feature in Euphoria Editor)
- Posted by Juergen Luethje <jluethje at gmx.de> Oct 25, 2002
- 456 views
Robert Craig wrote: > Carl White writes: >> Potential new users should know that it's not a >> happy editor under NT-based >> operating systems [NT, 2000, XP]. >> >> The two main things that don't work are >> transferring the Windows Clipboard >> and Long Filename support. > > In my local copy of ex.exe, DOS long filename support > has been extended to include XP and 2000. > It will be in the next release. Very nice! In the next release, will there also be DOS long filename support under Win 95/98/ME for current_dir(), chdir(), and *full* LFN support for dir() and open()? Hm.. Rob, did you already mention, when the next release will be available?)) Together with J.Brown, I began to work at a cross-platform library for directory and file operations some time ago. Unfortunately, it doesn't make much progress at the moment, because I have little time, but it shouldn't be too much work to extract the functions related to long filenames, and rearrange them somewhat. So Carl, until the next Eu release, if you have need for it (or anyone else), I can make a small library containing the following functions (tested on Win 98/1st ed. and Win 2000): ------------------------------------------------------------------------ i = dos_lfn_supported() Returns TRUE, if the current platform() is DOS32, and long filenames are supported, otherwise FALSE. ------------------------------------------------------------------------ s = dos_short_name(name) If dos_lfn_supported() is TRUE, this function returns the short (8.3) name of a file or directory. If dos_lfn_supported() is FALSE or an error occurs, the given name is returned. ------------------------------------------------------------------------ s = dos_long_name(name) If dos_lfn_supported() is TRUE, this function returns the long name of a file or directory. If dos_lfn_supported() is FALSE or an error occurs, the given name is returned. ------------------------------------------------------------------------ i = open(filename, mode) Euphoria's built-in open() function redefined, so that ex.exe can handle files with long names e.g. on Win 2000 (and also can create new files with long names on Win 9x). ------------------------------------------------------------------------ x = dir(name) Euphoria's dir() function rewritten, so that ex.exe can handle files with long names e.g. on Win 2000 (and also returns long filenames on Win 9x). ------------------------------------------------------------------------ s = current_dir() Euphoria's current_dir() function rewritten, so that ex.exe returns a long directory name e.g. on Win 2000 and Win 9x. ------------------------------------------------------------------------ i = chdir(newdir) Euphoria's chdir() function rewritten, so that 'newdir' can be a long directory name with ex.exe e.g. on Win 2000 and Win 9x. ------------------------------------------------------------------------ Regards, Juergen