Ok so I wrote up a quick program to see what could be going on, and realized that I also cannot rename a file.
1 2 3 4 5 6 7 8
int result;
fstream test;
test.open("oldname.txt");
result= rename( "oldname.txt" , "newname.txt" );
if ( result == 0 )
puts ( "File successfully renamed" );
else
perror( "Error renaming file" );
Error I'm getting is
No such file or directory.
So that sounds like to me that the file is never being created. So I was thinking, maybe the default write permissions of fstream wouldn't allow renaming, so I looked into write permissions, and didn't see any that sound related. And I believe fstream has default read/write permissions anyways.
So, what is going on here? I'm stumped
EDIT:
I just tried manually creating a file before execution, and I still got the same error message. Bleh