Raised This Month: $ Target: $400
 0% 

File Help


Post New Thread Reply   
 
Thread Tools Display Modes
Author Message
Flynn
Senior Member
Join Date: Sep 2009
Old 09-25-2009 , 12:19   Re: File Help
Reply With Quote #1

Quote:
Originally Posted by Dragonshadow View Post
Couldn't you just replace all the text on the line with a single space or a newline? Or is there no way to skip whitespace?
That is not how file storage works.

All information is written as data that's assigned within specific allocated space; you can always get more space (by referencing to new sectors etc), but you can't simply remove data, because you would leave a huge useless gap in the chain of assigned sectors, which is a waste of memory, and, would most likely break the chain. So instead, you allocate yourself some more memory, write what you want there, and delete the old data (allowing another file that space).

It's pretty much the same concept as writing a story to individual scraps of paper (with cello-tape tacking them together). When you tipex out the parts you don't like, you're left with a huge gaping space that looks ugly. You could re-write everything to fit but you would need to write everything to a seperate peice of paper (in order to remember it) and would have to tipex out everything after the correction and then re-write back in... why not just use the seperate piece of paper and recycle the paper with the mistakes on it?
Flynn is offline
Send a message via MSN to Flynn Send a message via Skype™ to Flynn
Dragonshadow
BANNED
Join Date: Jun 2008
Old 09-26-2009 , 08:51   Re: File Help
Reply With Quote #2

Quote:
Originally Posted by Flynn View Post
That is not how file storage works.

All information is written as data that's assigned within specific allocated space; you can always get more space (by referencing to new sectors etc), but you can't simply remove data, because you would leave a huge useless gap in the chain of assigned sectors, which is a waste of memory, and, would most likely break the chain. So instead, you allocate yourself some more memory, write what you want there, and delete the old data (allowing another file that space).

It's pretty much the same concept as writing a story to individual scraps of paper (with cello-tape tacking them together). When you tipex out the parts you don't like, you're left with a huge gaping space that looks ugly. You could re-write everything to fit but you would need to write everything to a seperate peice of paper (in order to remember it) and would have to tipex out everything after the correction and then re-write back in... why not just use the seperate piece of paper and recycle the paper with the mistakes on it?
That made perfect sense haha, +karma
Dragonshadow is offline
Reply



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT -4. The time now is 18:21.


Powered by vBulletin®
Copyright ©2000 - 2024, vBulletin Solutions, Inc.
Theme made by Freecode