T
Thom Little
What a curious use of the word rename ...
It is stated that
string strA= Path.GetTempFileName();
creates a temporary file name in the temp directory and ...
Path.ChangeExtension( strA, "xxx" );
.... renames it.
What actually happens is that ...
string strA= Path.GetTempFileName();
.... creates a unique temporary file of length "0" and ...
Path.ChangeExtension( strA, "xxx" );
.... makes a copy of the file changing the extension to ".xxx".
You will start noticing this by the accumulation of zero-length "files"in
the temporary directory each having a length of zero.
It is stated that
string strA= Path.GetTempFileName();
creates a temporary file name in the temp directory and ...
Path.ChangeExtension( strA, "xxx" );
.... renames it.
What actually happens is that ...
string strA= Path.GetTempFileName();
.... creates a unique temporary file of length "0" and ...
Path.ChangeExtension( strA, "xxx" );
.... makes a copy of the file changing the extension to ".xxx".
You will start noticing this by the accumulation of zero-length "files"in
the temporary directory each having a length of zero.