if (!file.canRead()) {
System.out.println("ERROR: the file access denied.");
return;
}
SystemInfo systemInfo = vfsService.getSystemInfo();
String parentFileID = session.getCurrentDirectory().getID();
String fileSessionID = null;
try {
VfsFile vfsFile = vfsService.createFile(
sessionID, parentFileID, cl.getArgs()[1]);
if (vfsService.isExistsName(
sessionID, vfsFile.getID(), cl.getArgs()[1]))
{
System.out.println("ERROR: the vfs_file_name already used.");
return;
}
fileSessionID = vfsService.createFileSession(
sessionID, vfsFile.getID(), FileSession.Mode.WRITE);
byte[] buf = new byte[systemInfo.getBytesPerWrite()];
FileInputStream fis = null;
try {
fis = new FileInputStream(file);
int count = 0;
while ((count = fis.read(buf)) != -1)