1. File IO
- Posted by Brian Jackson <bjackson at PRINTINGINC.COM> Dec 22, 1998
- 342 views
Hi all, O.K. I've been working (dabbling) in Euphoria for about 3 months now, and the biggest frustration I have is that it is very weak in file I/O. I'm used to having sequential forward and reverse disk reads, and random access (both indexed and truly random), sector reads, etc. File.e does have some nice features, and looks like a good place to start building a routine from. My question to the group is, would anyone like to help me create a routine that will support the following I/O methods: forward sequential, reverse sequential, random access, and indexed random access, to be bundled in one standard include file? I have a lot of experience in file structuring and disk management, but I'm still learning Euphoria, and doubt I could do it alone (within a reasonable time frame at least). If there's already something like that out there and I just haven't seen it, please let me know! Thanks, Brian Jackson P.S. - I was referring to the DOS32 platform, but I'd like to make it compatible with WIN32 and David's Win32Lib also!
2. Re: File IO
- Posted by JJProg at CYBERBURY.NET Dec 22, 1998
- 331 views
EU>Hi all, EU>O.K. I've been working (dabbling) in Euphoria for about 3 months now, and EU>the biggest frustration I have is that it is very weak in file I/O. I'm EU>used to having sequential forward and reverse disk reads, and random access EU>(both indexed and truly random), sector reads, etc. File.e does have some EU>nice features, and looks like a good place to start building a routine EU>from. My question to the group is, would anyone like to help me create a EU>routine that will support the following I/O methods: forward sequential, EU>reverse sequential, random access, and indexed random access, to be bundled EU>in one standard include file? I have a lot of experience in file EU>structuring and disk management, but I'm still learning Euphoria, and doubt EU>I could do it alone (within a reasonable time frame at least). If there's EU>already something like that out there and I just haven't seen it, please EU>let me know! EU>Thanks, EU>Brian Jackson EU>P.S. - I was referring to the DOS32 platform, but I'd like to make it EU>compatible with WIN32 and David's Win32Lib also! I'd be glad to help. Jeffrey Fielding JJProg at cyberbury.net http://members.tripod.com/~JJProg/
3. Re: File IO
- Posted by Brian Jackson <bjackson at PRINTINGINC.COM> Dec 23, 1998
- 332 views
>>I'd be glad to help. >> Jeffrey Fielding >> JJProg at cyberbury.net OK. Well, I guess the first thing we should do is agree on a lexical syntax that everyone can live with. Here are my suggestions: file_define() - create a handle to a file, and specify if it is indexed or random access open_file() = open a file, determine whether is is r/w, r, b, etc. If you open an index file, open_file automatically opens the text file as well. file_read() = read a file, using whatever access method is specified. file_write() = write to a file (or file and index, if necessary) file_update() = replace last record read with current data, and update index file_close() = self-explanatory file_delete() = deletes the last record read [this one is kinda confusing] file_deletek() = deletes the 'key' (index record) for the last read, text file is left alone file_deletedk () = deletes 'duplicate keys' from index, but not their text records file_erase() = erases all records from file, and indexes if applicable file_lock() = lock/unlock a file for network purposes file_positon() = same as 'where' command in file.e file_insert() = inserts a 'key' into an index. This would only work after a file_write() file_readks() = reads in 'key sequence' forward or backward. file_rename() = rename a closed file. file_reposition() = works like 'seek' and then of course, we'll need a standalone program to manage the indexed files! If there's anything I missed, or you want to make changes, feel free to do so. Brian