code: public static String getTemporaryFileName(String resourceName) {
  
          if (resourceName == null) {
              return null;
          }
          StringBuffer result = new StringBuffer(resourceName.length() + 2);
          result.append(CmsResource.getFolderPath(resourceName));
          result.append(CmsResource.TEMP_FILE_PREFIX);
          result.append(CmsResource.getName(resourceName));
          return result.toString();
      }
docs: Returns the temporary file name for the given resource name.<p>
  
  To create a temporary file name of a resource name, the prefix char <code>'~'</code> (tilde)
  is added to the file name after all parent folder names have been removed.<p>
  
  @param resourceName the resource name to return the temporary file name for
  
  @return the temporary file name for the given resource name
  
  @see CmsResource#isTemporaryFileName(String)
  @see #isTemporaryFile(CmsResource)