1. Scanning a directory an getting file names.
- Posted by Fendaril Sep 11, 2009
- 1183 views
- Last edited Sep 12, 2009
Does anybody know how to do this?
2. Re: Scanning a directory an getting file names.
- Posted by euphoric (admin) Sep 11, 2009
- 1156 views
- Last edited Sep 12, 2009
Does anybody know how to do this?
See dir.
3. Re: Scanning a directory an getting file names.
- Posted by jeremy (admin) Sep 11, 2009
- 1152 views
- Last edited Sep 12, 2009
Does anybody know how to do this?
include std/filesys.e include std/pretty.e pretty_print(1, dir("/"), {3})
You can look at Directory Handling in the manual for more information on what dir() actually returns.
Jeremy
4. Re: Scanning a directory an getting file names.
- Posted by Fendaril Sep 12, 2009
- 1117 views
- Last edited Sep 13, 2009
thanks. is my euphoria installation valid? it says it cannot find std/filesys.e when i try to run it.
5. Re: Scanning a directory an getting file names.
- Posted by jeremy (admin) Sep 12, 2009
- 1060 views
- Last edited Sep 13, 2009
thanks. is my euphoria installation valid? it says it cannot find std/filesys.e when i try to run it.
Is your EUDIR set? Also, please give the output of eui -version. Did you install from one of the installers? At the end it asks if you wish to update the environment (an option). This is turned off by default during the beta stages as to not convert anyone's machine to 4.0beta while they still want to have 3.x. If this is the case, maybe you'd be best off reinstalling and making sure that you tell the installer to update your environment.
Jeremy
6. Re: Scanning a directory an getting file names.
- Posted by mattlewis (admin) Sep 12, 2009
- 1216 views
- Last edited Sep 13, 2009
thanks. is my euphoria installation valid? it says it cannot find std/filesys.e when i try to run it.
Is your EUDIR set?
Even better, create a eu.cfg file.
Matt
7. Re: Scanning a directory an getting file names.
- Posted by euphoric (admin) Sep 12, 2009
- 1043 views
- Last edited Sep 13, 2009
thanks. is my euphoria installation valid? it says it cannot find std/filesys.e when i try to run it.
Is your EUDIR set?
Jeremy! Please stop recommending this archaic system!
eu.cfg FTW!
Unless Fendaril is using Euphoria 3.x.
8. Re: Scanning a directory an getting file names.
- Posted by jeremy (admin) Sep 12, 2009
- 1051 views
- Last edited Sep 13, 2009
Even better, create a eu.cfg file.
I wonder if we should be shipping with a eu.cfg file. Seems to make the most sense.
Jeremy
9. Re: Scanning a directory an getting file names.
- Posted by jeremy (admin) Sep 12, 2009
- 1050 views
- Last edited Sep 13, 2009
Jeremy! Please stop recommending this archaic system!
eu.cfg FTW!
It's easy, that's why I suggest it. With the file, you may put it in the wrong place, it may not find it, etc... set EUDIR is (almost) fool proof (not that you're a fool Fendaril!), just saying, it's easy.
Jeremy
10. Re: Scanning a directory an getting file names.
- Posted by mattlewis (admin) Sep 12, 2009
- 1033 views
- Last edited Sep 13, 2009
Even better, create a eu.cfg file.
I wonder if we should be shipping with a eu.cfg file. Seems to make the most sense.
Linux packages will. And, yes, the windows installer should, too. It should be simple, merely pointing to wherever the include directory is.
Matt
11. Re: Scanning a directory an getting file names.
- Posted by Fendaril Sep 12, 2009
- 1029 views
- Last edited Sep 13, 2009
The output of eui-version is 4.0.0 beta 2. Maybe its the cfg issue?
12. Re: Scanning a directory an getting file names.
- Posted by jeremy (admin) Sep 12, 2009
- 1029 views
- Last edited Sep 13, 2009
The output of eui-version is 4.0.0 beta 2. Maybe its the cfg issue?
Create a file in the same place as the binary name eu.cfg, and add into it:
-i /dir/to/euphoria/include
Or, type:
SET EUDIR=C:\dir\to\euphoria
Jeremy
13. Re: Scanning a directory an getting file names.
- Posted by Fendaril Sep 12, 2009
- 1029 views
- Last edited Sep 13, 2009
yes problem solved.
I had to add this to a binary cfg:
-i C:\euphoria-40b2\include\std
-i C:\euphoria-40b2\include
14. Re: Scanning a directory an getting file names.
- Posted by jeremy (admin) Sep 12, 2009
- 1076 views
- Last edited Sep 13, 2009
yes problem solved.
I had to add this to a binary cfg:
-i C:\euphoria-40b2\include\std
-i C:\euphoria-40b2\include
The first really shouldn't be there. The 4.0 standard is to use:
include std/regex.e include std/text.e ... etc ...
Thus, only the second should exist. -i c:\euphoria-40b2\include. This allows you to use most 3.x code found on the net and new 4.x code as well.
Jeremy