@Nullable
    public static FileInfo fromFile(File file) {
      String name = file.getName();
      int pos = name.lastIndexOf('.');
      if (pos <= 0) {
        return null; // no name part
      }
      String ext = name.substring(pos);
      @FileType String type = getFileTypefromExtension(ext);
      if (type == null) {
        return null; // unknown!
      }
      String resourceId = name.substring(0, pos);
      if (type.equals(FileType.TEMP)) {
        int numPos = resourceId.lastIndexOf('.');
        if (numPos <= 0) {
          return null; // no resourceId.number
        }
        resourceId = resourceId.substring(0, numPos);
      }

      return new FileInfo(type, resourceId);
    }
Holds information about the different files this storage uses (content, tmp). All file name
parsing should be done through here. Temp files creation is also handled here, to encapsulate
naming.
imagepipeline-base/src/main/java/com/facebook/cache/disk/DefaultDiskStorage.java