Understanding Windows' File Access Processes

  • Thread starter Thread starter ramollari
  • Start date Start date
  • Tags Tags
    File Windows
AI Thread Summary
Modern operating systems, like Windows, facilitate file access through a user-friendly interface, allowing users to open documents by double-clicking without needing to manually launch the associated application. This functionality is primarily managed by the operating system, which handles file associations. When developing a simple text editor for .txt files, it is essential to associate the application with the .txt file type within the OS settings. Once this association is established, the operating system will automatically execute the text editor when a .txt file is opened, passing the file name as a command-line parameter. However, the developer must implement the code to handle the file opening process within the application itself.
ramollari
Messages
433
Reaction score
1
Modern operating systems are file oriented, so in Windows you can access documents just by double clicking them without having to worry about opening the program. But I don't know how this is achieved. Is is done entirely by the OS or does the application program itself play a role? So suppose I want to develop a simple text editor that reads .txt files. Then if I specify that a .txt file be opened with that editor, will the latter be able automatically to deal with this request, or do I have to write special code for it?
 
Computer science news on Phys.org
What do you mean by "OS" there are different layers of the OS, opening a file via the GUI uses a few... Anyway I think your assumtion is correct, as long as you associated your program with the .txt files within the OS then every time you open an .txt file your application or .exe will open it
 
You don't have to write any code to get Windows to run your program for .txt files, just set the file association. But all Windows does is run your program with the .txt filename as a command-line parameter. You still have to open the file yourself.
 
In my discussions elsewhere, I've noticed a lot of disagreement regarding AI. A question that comes up is, "Is AI hype?" Unfortunately, when this question is asked, the one asking, as far as I can tell, may mean one of three things which can lead to lots of confusion. I'll list them out now for clarity. 1. Can AI do everything a human can do and how close are we to that? 2. Are corporations and governments using the promise of AI to gain more power for themselves? 3. Are AI and transhumans...
Thread 'ChatGPT Examples, Good and Bad'
I've been experimenting with ChatGPT. Some results are good, some very very bad. I think examples can help expose the properties of this AI. Maybe you can post some of your favorite examples and tell us what they reveal about the properties of this AI. (I had problems with copy/paste of text and formatting, so I'm posting my examples as screen shots. That is a promising start. :smile: But then I provided values V=1, R1=1, R2=2, R3=3 and asked for the value of I. At first, it said...

Similar threads

Replies
9
Views
1K
Replies
10
Views
2K
Replies
5
Views
1K
Replies
4
Views
3K
Replies
1
Views
3K
Replies
2
Views
4K
Back
Top