From 0f0f6bfa093714a9b174da1813addcd2e4164ef3 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?J=C3=B6rg=20Prante?= Date: Wed, 15 May 2024 17:27:31 +0200 Subject: [PATCH] rename internal upload method to doUpload --- .../apache/sshd/fs/spi/SFTPFileService.java | 20 +++++++++---------- 1 file changed, 10 insertions(+), 10 deletions(-) diff --git a/files-sftp-fs/src/main/java/org/apache/sshd/fs/spi/SFTPFileService.java b/files-sftp-fs/src/main/java/org/apache/sshd/fs/spi/SFTPFileService.java index c556012..14d71db 100644 --- a/files-sftp-fs/src/main/java/org/apache/sshd/fs/spi/SFTPFileService.java +++ b/files-sftp-fs/src/main/java/org/apache/sshd/fs/spi/SFTPFileService.java @@ -207,7 +207,7 @@ public class SFTPFileService implements FileService { Set filePermissions, CopyOption... copyOptions) throws IOException { performWithContext(ctx -> { - upload(ctx, Files.newByteChannel(source), ctx.fileSystem.getPath(target), + doUpload(ctx, Files.newByteChannel(source), ctx.fileSystem.getPath(target), dirPermissions, filePermissions, copyOptions); return null; }); @@ -227,7 +227,7 @@ public class SFTPFileService implements FileService { Set filePermissions, CopyOption... copyOptions) throws IOException { performWithContext(ctx -> { - upload(ctx, Files.newByteChannel(source), target, dirPermissions, filePermissions, copyOptions); + doUpload(ctx, Files.newByteChannel(source), target, dirPermissions, filePermissions, copyOptions); return null; }); } @@ -337,7 +337,7 @@ public class SFTPFileService implements FileService { Set filePermissions, CopyOption... copyOptions) throws IOException { performWithContext(ctx -> { - upload(ctx, Channels.newChannel(source), target, + doUpload(ctx, Channels.newChannel(source), target, dirPermissions, filePermissions, copyOptions); return null; }); @@ -350,18 +350,18 @@ public class SFTPFileService implements FileService { Set filePermissions, CopyOption... copyOptions) throws IOException { performWithContext(ctx -> { - upload(ctx, Channels.newChannel(source), ctx.fileSystem.getPath(target), + doUpload(ctx, Channels.newChannel(source), ctx.fileSystem.getPath(target), dirPermissions, filePermissions, copyOptions); return null; }); } - private void upload(SFTPContext ctx, - ReadableByteChannel source, - Path target, - Set dirPerms, - Set filePerms, - CopyOption... copyOptions) throws IOException { + private void doUpload(SFTPContext ctx, + ReadableByteChannel source, + Path target, + Set dirPerms, + Set filePerms, + CopyOption... copyOptions) throws IOException { prepareForWrite(target, dirPerms, filePerms); transfer(source, ctx.provider.newByteChannel(target, prepareWriteOptions(copyOptions))); }