I need to upload files to a server through SFTP. First I have to create a
file with a new file name. Then I have to write the outputstream to that
file to fill it with content.
The only method I have found for creating a new file is
createFile(FileName name)
in the SftpFileSystem class. But
Is there any simple way to rename a file?
Hi!
Please prefix your e-mail subject with the project name you have
problems with. In this case [VFS].
I need to upload files to a server through SFTP. First I have to create a
file with a new file name. Then I have to write the outputstream to that
file to fill it with content.
Create
Hi!
Is there any simple way to rename a file?
FileObject foNew = VFS.getManager().resolveFile(abcNew.txt);
VFS.getManager().resolveFile(abc.txt).moveTo(foNew);
moveTo issues a copyTo/delete or move operation depending if its on
the same filesystem or not.
Ciao,
Mario
Right-click and you'll see 'rename' there :)
-Original Message-
From: Eyvind Almqvist [mailto:[EMAIL PROTECTED]
Sent: Wednesday, January 31, 2007 8:41 AM
To: commons-user@jakarta.apache.org
Subject: How to rename a file?
Is there any simple way to rename a file?
For example, say after some period of time you want to force even active
objects out of the pool to give them a fresh start?
Travis