/** * Create a file (truncate it if it already exists) and open it for writing. * Same as {@link #createFileTruncate(String, SFTPv3FileAttributes) createFileTruncate(fileName, null)}. * * @param fileName See the {@link SFTPv3Client comment} for the class for more details. * @return a SFTPv3FileHandle handle * @throws IOException */ public SFTPv3FileHandle createFileTruncate(String fileName) throws IOException { return createFileTruncate(fileName, null); }
/** * Create a file (truncate it if it already exists) and open it for writing. * Same as {@link #createFileTruncate(String, SFTPv3FileAttributes) createFileTruncate(fileName, null)}. * * @param fileName See the {@link SFTPv3Client comment} for the class for more details. * @return a SFTPv3FileHandle handle * @throws IOException */ public SFTPv3FileHandle createFileTruncate(String fileName) throws IOException { return createFileTruncate(fileName, null); }
/** * Create a file (truncate it if it already exists) and open it for reading and writing. * Same as {@link #createFileTruncate(String, SFTPv3FileAttributes) createFileTruncate(fileName, null)}. * * @param fileName See the {@link SFTPv3Client comment} for the class for more details. * @return a SFTPv3FileHandle handle * @throws IOException */ public SFTPv3FileHandle createFileTruncate(String fileName) throws IOException { return createFileTruncate(fileName, null); }
/** * Create a file (truncate it if it already exists) and open it for writing. * Same as {@link #createFileTruncate(String, SFTPv3FileAttributes) createFileTruncate(fileName, null)}. * * @param fileName See the {@link SFTPv3Client comment} for the class for more details. * @return a SFTPv3FileHandle handle * @throws IOException */ public SFTPv3FileHandle createFileTruncate(String fileName) throws IOException { return createFileTruncate(fileName, null); }
SFTPv3FileAttributes attr = new SFTPv3FileAttributes(); attr.permissions = Integer.valueOf(permissions); handle = client.createFileTruncate(path, attr); } else { handle = client.openFileRW(path);
SFTPv3FileAttributes attr = new SFTPv3FileAttributes(); attr.permissions = Integer.valueOf(permissions); handle = client.createFileTruncate(path, attr); } else { handle = client.openFileRW(path);