class FileSystemOperations {

  public void validFileSize(String uri) throws IOException {
    boolean remote = remoteDirectoryManager.isRemote(uri);
    long actualSizeInBytes = getFileSizeInBytes(uri, remote);
    long maxFileSizeInBytes = convertToBytes(getMaxRemoteFileSizeMB());

    String locationType = remote ? "Remote" : "Local";
    LOG.info("{} file / directory path is {} with size: {} bytes."
        + " Allowed maximum file / directory size is {} bytes.",
        locationType, uri, actualSizeInBytes, maxFileSizeInBytes);

    if (actualSizeInBytes > maxFileSizeInBytes) {
      throw new IOException(
          String.format("Size of file / directory %s: %d bytes. " +
              "This exceeded the configured maximum " +
              "file / directory size, which is %d bytes.",
              uri, actualSizeInBytes, maxFileSizeInBytes));
    }
  }

  public  FileSystemOperations(ClientContext clientContext);

}