deleting line
#3

Quote:
Originally Posted by PowerPC603
Посмотреть сообщение
Just can't just remove the last line from a file.

You could read the file, line by line, and write each line to a second file and skip the last line.
Then delete the first (original) file and rename the second file to the original filename.

Or create an array big enough to read the entire file at once, overwrite the file with the data in the array but skip the last line.
that kind of action seem to slow the server and create lags, am i right? how critical is it?
Reply


Messages In This Thread
deleting line - by roi857 - 28.11.2014, 21:23
Re: deleting line - by PowerPC603 - 28.11.2014, 22:00
Re: deleting line - by roi857 - 28.11.2014, 22:26
Re: deleting line - by PowerPC603 - 28.11.2014, 22:54
Re: deleting line - by roi857 - 29.11.2014, 08:41

Forum Jump:


Users browsing this thread: 1 Guest(s)