deno.seeker

🌙
手机阅读
本文目录结构

继承关系

被谁实现

索引

Methods

Methods

seek

  • seek(offset: number, whence: SeekMode): Promise<number>

  • 设置下一个 read()write() 的偏移量,根据 whence 进行决定从哪个位置开始偏移: SEEK_START 表示相对于文件开头,SEEK_CURRENT 表示相对于当前位置,SEEK_END 表示相对于文件末尾。 Seek 解析(resolve)的值为相对于文件开头的新偏移量。

    Seek sets the offset for the next read() or write() to offset, interpreted according to whence: SEEK_START means relative to the start of the file, SEEK_CURRENT means relative to the current offset, and SEEK_END means relative to the end. Seek resolves to the new offset relative to the start of the file.

    把偏移量设置到文件开始之前是错误的。 设置任何正偏移都是合法的,但是对于之后的 I/O 操作的行为则取决于实现。 它返回设置之后的偏移位置。

    Seeking to an offset before the start of the file is an error. Seeking to any positive offset is legal, but the behavior of subsequent I/O operations on the underlying object is implementation-dependent. It returns the number of cursor position.

    参数

    返回 Promise<number>

图例说明

  • Method

本文档使用 TypeDoc 生成。

AXIHE / 精选资源

浏览全部教程

面试题

学习网站

前端培训
自己甄别

前端书籍

关于朱安邦

我叫 朱安邦,阿西河的站长,在杭州。

以前是一名平面设计师,后来开始接接触前端开发,主要研究前端技术中的JS方向。

业余时间我喜欢分享和交流自己的技术,欢迎大家关注我的 Bilibili

关注我: Github / 知乎

于2021年离开前端领域,目前重心放在研究区块链上面了

我叫朱安邦,阿西河的站长

目前在杭州从事区块链周边的开发工作,机械专业,以前从事平面设计工作。

2014年底脱产在老家自学6个月的前端技术,自学期间几乎从未出过家门,最终找到了满意的前端工作。更多>

于2021年离开前端领域,目前从事区块链方面工作了