1. Delete a file

Fifteen or twenty years ago I used Euphoria to create a program to create, display, and modify a binary tree of unlimited depth. In the interim, because of various events, the source code file has disappeared. I have a 19-page printout which I have used to recreate the source using the Euphoria editor to "ed" my .ex file. The function I apparently used to delete a temporary file (according to the printout) was: result = deleteFile("filename.dat") The editor cannot find that. An online API manual says use:

8.5.2.20 delete_file

include std/filesys.e

namespace filesys

public function delete_file(sequence name)

I have not been able to find filesys.e

My include files were: include file.e include get.e include graphics.e include machine.e include dll.e include wildcard.e include getch.e

include win32lib.e include bit.e

I had to comment out the last three because the system could not find them. I expect to use gets(1) in place of getch. The program uses DOS. I have Euphoria 3.0, running on Windows 10 Home. How do I delete a temporary file?

new topic     » topic index » view message » categorize

2. Re: Delete a file

Hi

I may be mistaken and AFAIR there was no delete_file or deleteFile in Eu 3.1, they were done by 3rd parties.

There was (and still is) a deleteFile in win32lib (the camelcase was the clue).

delete_file appeared in eu4, but prior to that and for quickeness I just used system("string", 0), and built the string beforehand.

I think there were some 3rd party libraries that covere file handling too.

Cheers

Chris

new topic     » goto parent     » topic index » view message » categorize

3. Re: Delete a file

"There was (and still is) a deleteFile in win32lib (the camelcase was the clue)."

Thanks, Chris. I have now found win32lib.ew. That should solve this problem.

new topic     » goto parent     » topic index » view message » categorize

Search



Quick Links

User menu

Not signed in.

Misc Menu