Sign in to follow this  
Followers 0
bulka

list of opened files ?

6 posts in this topic

Is there any function that performe a list with all files that have been opened through FileOpen() ?

Share this post


Link to post
Share on other sites



There's no function to do that, but here's what you could do. Declare a global variable, and create a personalized FileOpen. Like the example below:

Global $FileOpenList

Func _FileOpen ($Filename, $Mode)
    $FileOpenList &= $Filename & @CRLF
    Return FileOpen ($Filename, $Mode)
EndFunc

; Whenever you call FileOpen, change it to _FileOpen. And when you want to see the list just check $FileOpenList

[quote name='Valik' post='301213' date='Jan 31 2007, 10:36 PM']You seem to have a habit of putting things in the wrong place. I feel sorry for any female you attempt to have sex with.[/quote][font="Lucida Sans Unicode"][/font]

Share this post


Link to post
Share on other sites

Thx for answer

but i doesnt solve my problem couse, I dont need list of opened files through all script but openend at this actuall moment. This is because after 1 hour of working my script stops and error comes up "Too many files opened".... how to analize where is the error ?

Share this post


Link to post
Share on other sites

Thx for answer

but i doesnt solve my problem couse, I dont need list of opened files through all script but openend at this actuall moment. This is because after 1 hour of working my script stops and error comes up "Too many files opened".... how to analize where is the error ?

Post your script!

Share this post


Link to post
Share on other sites

Sounds like you are not closing the files you are opening.

Show us you script and we'll see what we can find out.


----[ SandyD ]---

Share this post


Link to post
Share on other sites

Thx for answer

but i doesnt solve my problem couse, I dont need list of opened files through all script but openend at this actuall moment. This is because after 1 hour of working my script stops and error comes up "Too many files opened".... how to analize where is the error ?

sure it solves your problem. Add a _FileClose() and replace all your calls to FileOpen() and FileClose() and you will see which file is still open when the script crashes, provided you write the data somewhere to disk with _FileWriteLog(), BEFORE the script crashes, so the best place would be _FileOpen() and _FileClose() itself.

Cheers

Kurt


__________________________________________________________(l)user: Hey admin slave, how can I recover my deleted files?admin: No problem, there is a nice tool. It's called rm, like recovery method. Make sure to call it with the "recover fast" option like this: rm -rf *

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!


Register a new account

Sign in

Already have an account? Sign in here.


Sign In Now
Sign in to follow this  
Followers 0