跳到主要内容

IO

DevTools 生成的流的输入/输出操作。

EN
Input/Output operations for streams produced by DevTools.

✅️️ Methods

🔨IO.close

关闭流,丢弃任何临时后备存储。

EN
Close the stream, discard any temporary backing storage.
参数必填标记类型描述原文
handle✔️StreamHandle关闭流的句柄。
ENHandle of the stream to close.

🔨IO.read

读取流的一个块

EN
Read a chunk of the stream
参数必填标记类型描述原文
handle✔️StreamHandle读取流的句柄。
ENHandle of the stream to read.
offsetinteger在读取之前跳转到指定的偏移量(如果未指定,则从上次读取后的偏移量继续)。某些类型的流可能仅支持顺序读取。
ENSeek to the specified offset before reading (if not specified, proceed with offset following the last read). Some types of streams may only support sequential reads.
sizeinteger要读取的最大字节数(如果未指定,则由代理自行决定)。
ENMaximum number of bytes to read (left upon the agent discretion if not specified).
返回对象类型描述原文
base64Encodedboolean设置数据是否为base64编码
ENSet if the data is base64-encoded
datastring读取的数据。
ENData that were read.
eofboolean设置读取时是否遇到文件结束条件。
ENSet if the end-of-file condition occurred while reading.

🔨IO.resolveBlob

返回由远程对象ID指定的Blob对象的UUID。

EN
Return UUID of Blob object specified by a remote object id.
参数必填标记类型描述原文
objectId✔️Runtime.RemoteObjectIdBlob 对象包装器的对象 ID。
ENObject id of a Blob object wrapper.
返回对象类型描述原文
uuidstring指定Blob的UUID。
ENUUID of the specified Blob.

✅️️ Types

📌IO.StreamHandle

这通常是从其他方法获取的,或者指定为blob:<uuid>,其中<uuid>是Blob的唯一标识符。

EN
This is either obtained from another method or specified as blob:<uuid> where <uuid> is an UUID of a Blob.

返回类型:string