A query that returns the current state of a file. Queries do not change the state of the file or require network consensus. The information is returned from a single node processing the query.Query Fees
Please see the transaction and query fees table for the base transaction fee
//Create the queryFileInfoQuery query = new FileInfoQuery() .setFileId(fileId);//Sign the query with the client operator private key and submit to a Hedera networkFileInfo getInfo = query.execute(client);System.out.println("File info response: " +getInfo);
//Create the queryconst query = new FileInfoQuery() .setFileId(fileId);//Sign the query with the client operator private key and submit to a Hedera networkconst getInfo = await query.execute(client);console.log("File info response: " + getInfo);
//Create the queryquery := hedera.NewFileInfoQuery(). SetFileID(newFileId)//Sign the query with the client operator private key and submit to a Hedera networkgetInfo, err := query.Execute(client)fmt.Println(getInfo)
// Create the querylet query = FileInfoQuery::new() .file_id(file_id);// Submit the query to a Hedera networklet file_info = query.execute(&client).await?;// Print the file info to the consoleprintln!("File info: {:?}", file_info);// v0.34.0