Skip to contentSkip to conversation

OT: simple file operations in C

DISCUSSION darren 3 participants 4 messages Mar 10, 2003

lore
Share & tools
lore

darren

author
#0 lore raw

Hi all,

Sorry for being slightly off-topic.

I want my program to be able copy, move and delete files, but i cannot seem to find any available functions or system calls to do this.

I don't really want to use shell by invoking "exec("mv XX YYY");, and i also do not want to fopen 2 files and then do multiple freads and fwrites.

Any suggestions?

Regards
Darren

#1 lore raw
Quoted 9 lines · darren

Hi all,

Sorry for being slightly off-topic.

I want my program to be able copy, move and delete files, but i cannot seem to find any available functions or system calls to do this.

I don't really want to use shell by invoking "exec("mv XX YYY");, and i also do not want to fopen 2 files and then do multiple freads and fwrites.

Any suggestions?

If you will never send your original mail once again someone may answer -- otherways you are definitely SPAMMING!!! and you should be excluded.

Manuel

#2 lore raw
Quoted 9 lines · darren

Hi all,

Sorry for being slightly off-topic.

I want my program to be able copy, move and delete files, but i cannot seem to find any available functions or system calls to do this.

I don't really want to use shell by invoking "exec("mv XX YYY");, and i also do not want to fopen 2 files and then do multiple freads and fwrites.

Any suggestions?

Unlink and rename will delete and remove, but copying you cannot do in Unix in a single system call until we release sys_reiser4()

Signature · 1 line
Hans
author
#3 lore raw
In reply to Manuel Krause

Hi all and Manuel,

Sorry my mail was sent multiple times (that's what happens when you use the http version of myrealbox sometimes).

Anyway, for the newbies who may have the same problem as me:

File operations:

Move: rename
Delete: Unlink
Copy: no choice...must open read write close.

I am just curious, but will the link command work for a file copy?

Regards
Darren

-----Original Message-----
From: Manuel Krause [mailto:[email protected]]
Sent: Monday, March 10, 2003 12:37 PM
To: darren
Cc: reiserfs-list
Subject: Re: OT: simple file operations in C

Quoted 5 lines · darren

Hi all,

Sorry for being slightly off-topic.

I want my program to be able copy, move and delete files, but i cannot

seem to find any available functions or system calls to do this.

Quoted 2 lines

I don't really want to use shell by invoking "exec("mv XX YYY");, and

i also do not want to fopen 2 files and then do multiple freads and fwrites.

Quoted 2 lines

Any suggestions?

If you will never send your original mail once again someone may answer -- otherways you are definitely SPAMMING!!! and you should be excluded.

Manuel