shadows/framework/src/main/java/org/robolectric/shadows/ShadowStorageManager.java
@Implementation(minSdk = N)
  public StorageVolume getStorageVolume(File file) {
    for (StorageVolume volume : storageVolumeList) {
      File volumeFile = volume.getPathFile();
      if (file.getAbsolutePath().equals(volumeFile.getAbsolutePath())) {
        return volume;
      }
    }
    return null;
  }
@Implementation(minSdk = N)
  public StorageVolume getStorageVolume(File file) {
    for (StorageVolume volume : storageVolumeList) {
      File volumeFile = volume.getPathFile();
      if (file.getAbsolutePath().equals(volumeFile.getAbsolutePath())) {
        return volume;
      }
    }
    return null;
  }
@ Implementation ( minSdk = N ) public StorageVolume getStorageVolume ( File file ) { for ( StorageVolume volume : storageVolumeList ) { File volumeFile = volume . getPathFile ( ) ; if ( file . getAbsolutePath ( ) . equals ( volumeFile . getAbsolutePath ( ) ) ) { return volume ; } } return null ; }
Checks whether File belongs to any {@link StorageVolume} in the list returned by {@link
#getStorageVolumes()}.

@param File to check
@return StorageVolume for the file
Checks whether File belongs to any { @link StorageVolume } in the list returned by { @link #getStorageVolumes () } .