docs: public static void copyFile(File source, File target, long sourceCount) {
          if (!source.exists()) {
              throw new IllegalArgumentException("Source does not exist " + source.getAbsolutePath());
          }
          if (!source.isFile()) {
              throw new IllegalArgumentException("Source is not a file " + source.getAbsolutePath());
          }
          if (!target.exists() && !target.mkdirs()) {
              throw new HazelcastException("Could not create the target directory " + target.getAbsolutePath());
          }
          final File destination = target.isDirectory() ? new File(target, source.getName()) : target;
          FileInputStream in = null;
          FileOutputStream out = null;
          try {
              in = new FileInputStream(source);
              out = new FileOutputStream(destination);
              final FileChannel inChannel = in.getChannel();
              final FileChannel outChannel = out.getChannel();
              final long transferCount = sourceCount > 0 ? sourceCount : inChannel.size();
              inChannel.transferTo(0, transferCount, outChannel);
          } catch (Exception e) {
              throw new HazelcastException("Error occurred while copying file", e);
          } finally {
              closeResource(in);
              closeResource(out);
          }
      }