static String buildTargetFolderForCustomAppFiles(String targetUrl, EncryptionService encryptionService) {
        ResourceDescriptor descriptor = ResourceDescriptorFactory.fromAnyUrl(targetUrl, encryptionService);
        if (descriptor.isFolder()) {
            throw new IllegalArgumentException("target url must be a file");
        }
        if (descriptor.getType() != ResourceTypes.APPLICATION) {
            throw new IllegalArgumentException("target url must be an application type");
        }
        String appName = descriptor.getName();
        String appPath = descriptor.getParentPath();
        if (appPath == null) {
            return "." + appName + ResourceDescriptor.PATH_SEPARATOR;
        } else {
            return appPath + ResourceDescriptor.PATH_SEPARATOR + "." + appName + ResourceDescriptor.PATH_SEPARATOR;
        }
    }
Builds the target folder path for custom application files.

@param targetUrl the target URL of the application being published
@return the constructed target folder path for custom application files
server/src/main/java/com/epam/aidial/core/server/service/PublicationUtil.java