problems in file handling

A

ashu

can i make my own file rename, delete functions. if it is the how it
is possible
help me
 
N

Nick Keighley

ashu said:
can i make my own file rename, delete functions. if it is the how it
is possible
help me

why would you want to do this? In principal, yes you could do this but
it very platform specific. You'd need to go to a platform specific
group
(Win32 or Unix etc.) access the file system. Or write your own file
system (not to be recomended as a first programming excercise! :)


--
Nick Keighley

My god it's full of stars!
Dave Bowman, on seeing HAL's source code

My god it's full of mouse ****!
An engineer diagnosing a faulty processor
 
B

Ben Pfaff

ashu said:
can i make my own file rename, delete functions. if it is the how it
is possible

There are already standard functions rename() and remove() that
will rename and delete files.
 
J

Jordan Abel

why would you want to do this? In principal, yes you could do this but
it very platform specific. You'd need to go to a platform specific
group
(Win32 or Unix etc.) access the file system. Or write your own file
system (not to be recomended as a first programming excercise! :)

Or write it in terms of rename() [is that standard C? if not, you could
copy and delete] and remove().
 
M

Malcolm

ashu said:
can i make my own file rename, delete functions. if it is the how it
is possible
help me
Normally you would implement these functions by calling platform-specific
code provided by the creators of the operating system.
If you want to build a file system yourself it is very difficult. You have
to know how files are laid out on disk, and how to address the disk
controller at a low level to mark files as deleted, change the name, and so
on.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

Forum statistics

Threads
474,175
Messages
2,570,946
Members
47,498
Latest member
yelene6679

Latest Threads

Top