src/main/java/com/jmsoftware/datastructuresandalgorithms/common/util/FileUtil.java
/**
     * Generate date-format storage path (relative path, w/o SFTP's server directory)
     *
     * @param sftpSubDirectory SFTP server's sub directory
     * @return full storage path (absolute path). Null if file name is empty.
     */
Generate date-format storage path (relative path, w/o SFTP's server directory)
@param sftpSubDirectory SFTP server's sub directory
@return full storage path (absolute path). Null if file name is empty.
Generate date - format storage path ( relative path w / o SFTP ' s server directory ) @param sftpSubDirectory SFTP server ' s sub directory @return full storage path ( absolute path ) . Null if file name is empty .
public static String generateDateFormatStoragePath(final String sftpSubDirectory) {
        var today = new Date();
        var year = DateUtil.format(today, "yyyy");
        var month = DateUtil.format(today, "MM");
        var day = DateUtil.format(today, "dd");
        return sftpSubDirectory
                + year
                + "/" + month
                + "/" + day
                + "/";
    }
public static String generateDateFormatStoragePath ( final String sftpSubDirectory ) { var today = new Date ( ) ; var year = DateUtil . format ( today , "yyyy" ) ; var month = DateUtil . format ( today , "MM" ) ; var day = DateUtil . format ( today , "dd" ) ; return sftpSubDirectory + year + "/" + month + "/" + day + "/" ; }
Generate date-format storage path (relative path, w/o SFTP's server directory)
 @param sftpSubDirectory SFTP server's sub directory
 @return full storage path (absolute path).
Generate date - format storage path ( relative path w / o SFTP ' s server directory ) @param sftpSubDirectory SFTP server ' s sub directory @return full storage path ( absolute path ) .