public static String convertToFilePath(String objectName) {
    if (!Strings.isNullOrEmpty(objectName)) {
      if (objectHasDirectoryPath(objectName)) {
        objectName = objectName.substring(0, objectName.length() - 1);
      }
    }
    return objectName;
  }
public static String convertToFilePath ( String objectName ) { if ( ! Strings . isNullOrEmpty ( objectName ) ) { if ( objectHasDirectoryPath ( objectName ) ) { objectName = objectName . substring ( 0 , objectName . length ( ) - 1 ) ; } } return objectName ; }
Converts the given object name to look like a file path.
If the object name already looks like a file path then
this call is a no-op.

If the object name is null or empty, it is returned as-is.

@param objectName Name of the object to inspect.
@return File path for the given path.