goja-web/src/main/java/goja/mvc/upload/filerenamepolicy/FileRenamePolicyWrapper.java
public String appendFileSeparator(String path) {
        if (null == path) {
            return File.separator;
        }
        // add "/" prefix
        if (!path.startsWith(StringPool.SLASH) && !path.startsWith(StringPool.BACK_SLASH)) {
            path = File.separator + path;
        }

        // add "/" postfix
        if (!path.endsWith(StringPool.SLASH) && !path.endsWith(StringPool.BACK_SLASH)) {
            path = path + File.separator;
        }
        return path;
    }
public String appendFileSeparator(String path) {
        if (null == path) {
            return File.separator;
        }
        // add "/" prefix
        if (!path.startsWith(StringPool.SLASH) && !path.startsWith(StringPool.BACK_SLASH)) {
            path = File.separator + path;
        }

        // add "/" postfix
        if (!path.endsWith(StringPool.SLASH) && !path.endsWith(StringPool.BACK_SLASH)) {
            path = path + File.separator;
        }
        return path;
    }
public String appendFileSeparator ( String path ) { if ( null == path ) { return File . separator ; } // add "/" prefix if ( ! path . startsWith ( StringPool . SLASH ) && ! path . startsWith ( StringPool . BACK_SLASH ) ) { path = File . separator + path ; } // add "/" postfix if ( ! path . endsWith ( StringPool . SLASH ) && ! path . endsWith ( StringPool . BACK_SLASH ) ) { path = path + File . separator ; } return path ; }
Add File Separator
Add File Separator