createfile function
createfile function
i'm a little confused about file descriptors. What does opening a file really mean? Does the OS read from the HDD and write the file to user space? A file descriptor by definition is an abstract reference to an open file...so what does that actually mean? when you use fstream objects, are they file descriptors like stdin and stdout? Or, if i open a file using fstream would it return the file descriptor of the file that i opened? I'm confused because they say that stdin and stdout are files that get file descriptors, but ive also heard that they are streams and I can't figure out how a program would create a file like stdin or stdout.
Re: createfile function
I think I found the answer...I was reading about named pipes and basically they are the same thing as open files in the operating system...and your program gets the handle or file descriptor as a return value. (ex. function: createfile) in windows.
- Bender
- Member
- Posts: 449
- Joined: Wed Aug 21, 2013 3:53 am
- Libera.chat IRC: bender|
- Location: Asia, Singapore
Re: createfile function
What do you mean by a file? (In this context)
"In a time of universal deceit - telling the truth is a revolutionary act." -- George Orwell
(R3X Runtime VM)(CHIP8 Interpreter OS)
(R3X Runtime VM)(CHIP8 Interpreter OS)