Is there a C runtime file delete function?

Discussion in 'C Programming' started by Angus Comber, Jan 22, 2004.

  1. Angus Comber

    Angus Comber Guest

    I have been looking at the fopen etc but cannot seem to find a way to delete
    a file using C runtime functions.

    Angus Comber
     
    Angus Comber, Jan 22, 2004
    #1
    1. Advertising

  2. Christopher Benson-Manica, Jan 22, 2004
    #2
    1. Advertising

  3. Christopher Benson-Manica wrote:

    > Angus Comber <> spoke thus:
    >
    >> I have been looking at the fopen etc but cannot seem to find a way to
    >> delete a file using C runtime functions.

    >
    > (That's because you can't, with standard C.)


    Wrong.

    --
    Richard Heathfield :
    "Usenet is a strange place." - Dennis M Ritchie, 29 July 1999.
    C FAQ: http://www.eskimo.com/~scs/C-faq/top.html
    K&R answers, C books, etc: http://users.powernet.co.uk/eton
     
    Richard Heathfield, Jan 22, 2004
    #3
  4. Angus Comber wrote:

    > I have been looking at the fopen etc but cannot seem to find a way to
    > delete a file using C runtime functions.


    Yes. It's called remove(), and it is declared in <stdio.h>

    --
    Richard Heathfield :
    "Usenet is a strange place." - Dennis M Ritchie, 29 July 1999.
    C FAQ: http://www.eskimo.com/~scs/C-faq/top.html
    K&R answers, C books, etc: http://users.powernet.co.uk/eton
     
    Richard Heathfield, Jan 22, 2004
    #4
  5. Angus Comber

    Alan Balmer Guest

    On Thu, 22 Jan 2004 22:33:07 +0000 (UTC), Christopher Benson-Manica
    <> wrote:

    >Angus Comber <> spoke thus:
    >
    >> I have been looking at the fopen etc but cannot seem to find a way to delete
    >> a file using C runtime functions.

    >
    >(That's because you can't, with standard C.)
    >
    >http://www.csclub.uwaterloo.ca/u/dj3vande/clc/clc-welcome.txt
    >http://www.eskimo.com/~scs/C-faq/top.html
    >http://benpfaff.org/writings/clc/off-topic.html


    http://www.eskimo.com/~scs/C-faq/q19.16.html

    <G>

    --
    Al Balmer
    Balmer Consulting
     
    Alan Balmer, Jan 22, 2004
    #5
  6. Christopher Benson-Manica wrote:
    > Angus Comber <> spoke thus:
    >
    >
    >>I have been looking at the fopen etc but cannot seem to find a way to delete
    >>a file using C runtime functions.

    >
    >
    > (That's because you can't, with standard C.)


    Then what does remove do?

    --
    Thomas.
     
    Thomas Stegen, Jan 22, 2004
    #6
  7. Thomas Stegen <> spoke thus:

    > Then what does remove do?


    Remove my sense of shame? *sigh*

    --
    Christopher Benson-Manica | I *should* know what I'm talking about - if I
    ataru(at)cyberspace.org | don't, I need to know. Flames welcome.
     
    Christopher Benson-Manica, Jan 23, 2004
    #7
    1. Advertising

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

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. ABC
    Replies:
    1
    Views:
    424
    Eliyahu Goldin
    Mar 29, 2006
  2. Replies:
    3
    Views:
    8,533
  3. Replies:
    2
    Views:
    971
    Bengt Richter
    Aug 1, 2005
  4. Angus Comber
    Replies:
    6
    Views:
    1,179
    Keith Thompson
    Oct 12, 2005
  5. aaragon
    Replies:
    15
    Views:
    538
    Daniel T.
    Dec 30, 2007
Loading...

Share This Page