473,388 Members | 1,326 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,388 software developers and data experts.

problems in file handling

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

Feb 25 '06 #1
4 1814
ashu wrote:
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

Feb 25 '06 #2
"ashu" <ri*********@yahoo.com> writes:
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.
--
int main(void){char p[]="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuv wxyz.\
\n",*q="kl BIcNBFr.NKEzjwCIxNJC";int i=sizeof p/2;char *strchr();int putchar(\
);while(*q){i+=strchr(p,*q++)-p;if(i>=(int)sizeof p)i-=sizeof p-1;putchar(p[i]\
);}return 0;}
Feb 25 '06 #3
On 2006-02-25, Nick Keighley <ni******************@hotmail.com> wrote:
ashu wrote:
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! :-)


Or write it in terms of rename() [is that standard C? if not, you could
copy and delete] and remove().
Feb 25 '06 #4
"ashu" <ri*********@yahoo.com> wrote

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.

--
Buy my book 12 Common Atheist Arguments (refuted)
$1.25 download or $6.90 paper, available www.lulu.com
Feb 26 '06 #5

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

19
by: Gerson Kurz | last post by:
AAAAAAAARG I hate the way python handles unicode. Here is a nice problem for y'all to enjoy: say you have a variable thats unicode directory = u"c:\temp" Its unicode not because you want it...
9
by: Hans-Joachim Widmaier | last post by:
Hi all. Handling files is an extremely frequent task in programming, so most programming languages have an abstraction of the basic files offered by the underlying operating system. This is...
11
by: Josh | last post by:
Hi, I am having a problem with Python. I am new to Python as a programming language, but I do have experience in other languages. I am experiencing strange problems with File handling and wonder...
6
by: Daniel Wilson | last post by:
I am having exception-handling and stability problems with .NET. I will have a block of managed code inside try...catch and will still get a generic ..NET exception box that will tell me which...
5
by: Chua Wen Ching | last post by:
Hi, I read from this tutorial at codeproject Question A: http://www.codeproject.com/csharp/GsXPathTutorial.asp regarding xpath.. but i try to apply in my situation, and can't get it...
4
by: HNguyen | last post by:
Hi, I have a Web application in ASP.NET. My Application allows the users upload files into the server after checking their user names and passwords. For each transaction, the Web program will...
2
by: Joel D. Kraft | last post by:
I've been very happy with the performance and new features of my site since we converted to ASP.NET 2.0 beta 2. I have noticed a couple of interesting problems, though, which I am trying to...
1
by: Neil Billingham | last post by:
Hi, Has anyone experienced problems when deploying a web app via VS2005 with regards health monitoring configuration settings in the web.config? I get a "could not load file or assembly '__code'...
5
by: Simon | last post by:
I have problem with namespaces. I have a program that consumes the web service and has for instance names space nsProgram. In this program I have defined several classes that I use for storing and...
15
by: joker197cinque | last post by:
I'm trying to fopen a file this way: $handle = fopen("http://localhost/test.html", "r"); but tha page remains "loading .." for 30 seconds and then goes in timeout. However I can open that...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: ryjfgjl | last post by:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.