Method mv()
- Method
mv
intmv(stringfrom,stringto)- Description
Rename or move a file or directory.
If the destination already exists, it will be replaced. Replacement often only works if
tois of the same type asfrom, i.e. a file can only be replaced by another file and so on. Also, a directory will commonly be replaced only if it's empty.On some OSs this function can't move directories, only rename them.
- Returns
Returns
0(zero) on failure,1otherwise. Call errno() to get more error info on failure.- See also