Click to See Complete Forum and Search --> : General question
Daouk.F
October 31st, 2006, 05:42 AM
Hello all.
I am using VC++6 under windows XP professional.
How the OS keeps track of all the files belonging to a particular application ?
Say I have a project named myProject.dsw.
Where all the references to the files belonging to that myPrject.dsw are stored by the operating system.
Put in other way,is there any way to know that a particlar file can be
destroyed without affecting an existing application ?
Thanks for any hint.
Alventis
October 31st, 2006, 09:14 AM
> How the OS keeps track of all the files belonging to a particular application?
It doesn't.
> all the references to the files belonging to that myPrject.dsw are stored by the operating system
No, these references are stored by (and only known to/understood by) VC++.
> is there any way to know that a particlar file can be destroyed without affecting an existing application?
Not with any degree of certainty. You can take a file name and guess certain things about it based on its name. For example, you could perform a search in the relevant directory tree for any other files referencing this file (in ASCII and Unicode modes). If you find a reference, this is who uses it. If you don't find a reference, maybe it's not used or maybe you just didn't find it (maybe the stuff using/referencing it is compressed).
For some files, you can guess things based on their name/extension. For example, OBJ files - well, we all know what they are and what/when uses them, etc.
HTH,
Daouk.F
October 31st, 2006, 10:00 AM
You say
--------------Quote------------
> How the OS keeps track of all the files belonging to a particular application?
It doesn't.
------------ Unquote------------
What???
That does not make sense at all.
Can you please extend on that ?
If the OS does not know about a specific application and it's components,who does ?
MrViggy
October 31st, 2006, 11:16 AM
You say
--------------Quote------------
> How the OS keeps track of all the files belonging to a particular application?
It doesn't.
------------ Unquote------------
What???
That does not make sense at all.
Can you please extend on that ?
If the OS does not know about a specific application and it's components,who does ?
The application itself. The OS has no knowledge of other applciation's files, and doesn't care. It's up to the applciation itself to "keep track" of the files it needs.
Viggy
Daouk.F
October 31st, 2006, 11:44 AM
You mean when you ask the OS to search for a file,the OS tells you where it is,it's size,the time it has been created,the time it was last accessed...and at the same time it does not know about it ?
I can't believe this.
SuperKoko
October 31st, 2006, 05:44 PM
You mean when you ask the OS to search for a file,the OS tells you where it is,it's size,the time it has been created,the time it was last accessed...and at the same time it does not know about it ?
I can't believe this.
The OS has no notion of "package" or such thing.
He knows about the file system, but for the OS, each file is independent.
Before year 2000, most applications under Win32 had its own system to keep track of their files.... Nowadays, many (but not all) Win32 commercial software use the MSI technology to install/desinstall themselves.
Again, it's only a superficial system, and the OS kernel is unaware of it.
Daouk.F
November 1st, 2006, 02:56 AM
Thank you very much for your help.
exterminator
November 5th, 2006, 06:20 AM
Thank you very much for your help.There are project files that keep track of the files that are part of a particular project. The IDE reads that file and regroups them to form your workspace. OS just treats them as normal files. It is the IDE that created the project understands the files. If you have a VC++ 6.0 project take a look at the dsw and dsp files (open them in notepad or textpad or wordpad or any other text editor) - you will see the list of files mentioned there that are part of the project esp in the dsp files.
codeguru.com
Copyright Internet.com Inc., All Rights Reserved.