/// Finds any CODEC devices, connects to any that are available
Finds any CODEC devices, connects to any that are available
Finds any CODEC devices connects to any that are available
pub async fn find_devices() -> Result<Vec<PathBuf>, Error> {
    // Connect to the component's environment.
    let directory_proxy = open_directory_in_namespace(CODEC_DEVICE_DIR, OPEN_RIGHT_READABLE)?;
    let files = files_async::readdir(&directory_proxy).await?;
    let paths: Vec<_> =
        files.iter().map(|file| Path::new(CODEC_DEVICE_DIR).join(&file.name)).collect();
    Ok(paths)
}
pub async fn find_devices ( ) -> Result < Vec < PathBuf > , Error > { // Connect to the component's environment. let directory_proxy = open_directory_in_namespace ( CODEC_DEVICE_DIR , OPEN_RIGHT_READABLE ) ? ; let files = files_async :: readdir ( & directory_proxy ) . await ? ; let paths : Vec < _ > = files . iter ( ) . map ( | file | Path :: new ( CODEC_DEVICE_DIR ) . join ( & file . name ) ) . collect ( ) ; Ok ( paths ) }
Finds any CODEC devices, connects to any that are available
Finds any CODEC devices connects to any that are available