Get file info
Constructor
Description
new FileInfoQuery()Methods
Method
Type
Description
Get query values
Method
Type
Description
Last updated
new FileInfoQuery()Last updated
//Create the query
FileInfoQuery query = new FileInfoQuery()
.setFileId(fileId);
//Sign the query with the client operator private key and submit to a Hedera network
FileInfo getInfo = query.execute(client);
System.out.println("File info response: " +getInfo);//Create the query
const query = new FileInfoQuery()
.setFileId(fileId);
//Sign the query with the client operator private key and submit to a Hedera network
const getInfo = await query.execute(client);
console.log("File info response: " +getInfo);//Create the query
query := hedera.NewFileInfoQuery().
SetFileID(newFileId)
//Sign the query with the client operator private key and submit to a Hedera network
getInfo, err := query.Execute(client)
fmt.Println(getInfo)FileInfo{
fileId=0.0.104926,
size=26,
expirationTime=2021-02-10T17:48:15Z,
deleted=false,
keys=[ 302a300506032b6570032100100059296cc51f5d362a3859d3c3c74c6a480cffad9d669a10c1d447ce56e5bf
]
}//Create the query
FileInfoQuery query = new FileInfoQuery()
.setFileId(fileId);
//Get file ID
FileId getFileId = query.getFileId();
//v2.0.0//Create the query
FileInfoQuery query = new FileInfoQuery()
.setFileId(fileId);
//Get file ID
const getFileId = query.getFileId();
//v2.0.0//Create the query
query := hedera.NewFileContentsQuery().
SetFileID(newFileId)
//Get file ID
getFileId := query.GetFileID()
//v2.0.0