cplusplus
.com
TUTORIALS
REFERENCE
ARTICLES
FORUM
C++
Tutorials
Reference
Articles
Forum
Forum
Beginners
Windows Programming
UNIX/Linux Programming
General C++ Programming
Lounge
Jobs
Forum
General C++ Programming
Create Your Own file stream
Create Your Own file stream
May 28, 2011 at 4:57am UTC
trollger
(5)
Hi Every One this is my first post :)
I was wondering if there is a way to create my own file stream. My goal is to be able to manipulate the file system with out using any external libraries (such as the std)
I am on GNU/Linux and this is mostly for fun/education
any tips or suggestions would be great.
Thank you.
May 29, 2011 at 5:28pm UTC
shacktar
(1187)
I guess you can make your own stream class that wraps these low-level functions:
http://www.gnu.org/s/hello/manual/libc/Low_002dLevel-I_002fO.html
May 30, 2011 at 8:30pm UTC
trollger
(5)
Thanks for the reply. I will look into that
but I would like to ask another question: How do libraries such as boost make their own file system api?
Thank you
Last edited on
May 30, 2011 at 8:30pm UTC
May 30, 2011 at 9:46pm UTC
kev82
(323)
Why don't you read the source code of boost::filesystem?
Essentially though, they call the appropriate system calls, if you're on linux check section 2 of your system manual:
man 2 intro
and
ls /usr/share/man/man2/
Topic archived. No new replies allowed.