SW006014 Microchip Technology, SW006014 Datasheet - Page 81

C COMPILER MPLAB FOR PIC24 MCU

SW006014

Manufacturer Part Number
SW006014
Description
C COMPILER MPLAB FOR PIC24 MCU
Manufacturer
Microchip Technology
Type
MPLAB® C Compilerr
Series
PIC24r
Datasheet

Specifications of SW006014

Supported Families
PIC24
Core Architecture
PIC
Kit Contents
Software And Docs
Mcu Supported Families
PIC24
Tool Function
Compiler
Tool Type
Compiler
Processor Series
PIC24
Lead Free Status / RoHS Status
Not applicable / Not applicable
For Use With/related Products
PIC24
Lead Free Status / Rohs Status
Lead free / RoHS Compliant
© 2008 Microchip Technology Inc.
remove
Description:
Include:
Prototype:
Argument:
Return Value:
Remarks:
Example:
rename
Description:
Include:
Prototype:
Arguments:
Return Value:
Remarks:
Example:
Deletes the specified file.
<stdio.h>
int remove(const char *filename);
filename
Returns 0 if successful, -1 if not.
If filename does not exist or is open, remove will fail.
#include <stdio.h> /* for remove, printf */
int main(void)
{
}
Output:
File removed
Renames the specified file.
<stdio.h>
int rename(const char *old, const char *new);
old
new
Return 0 if successful, non-zero if not.
The new name must not already exist in the current working directory,
the old name must exist in the current working directory.
#include <stdio.h> /* for rename, printf */
int main(void)
{
}
Output:
File renamed
if (remove("myfile.txt") != 0)
else
if (rename("myfile.txt","newfile.txt") != 0)
else
printf("Cannot remove file");
printf("File removed");
printf("Cannot rename file");
printf("File renamed");
name of file to be deleted.
pointer to the old name
pointer to the new name.
DS51456E-page 77

Related parts for SW006014