增加 Seek 方法.
Signed-off-by: rick.chan <chenyang@autoai.com>
This commit is contained in:
parent
991717bf58
commit
7f0ac55978
|
@ -73,6 +73,18 @@ func (f *File) Read(b []byte) (n int, err error)
|
|||
func (f *File) Write(b []byte) (n int, err error)
|
||||
```
|
||||
|
||||
### 1.6.设置读写位置
|
||||
|
||||
```go
|
||||
/**
|
||||
* @param whence
|
||||
* os.SEEK_SET: seek relative to the origin of the file
|
||||
* os.SEEK_CUR: seek relative to the current offset
|
||||
* os.SEEK_END: seek relative to the end
|
||||
*/
|
||||
func (f *File) Seek(offset int64, whence int) (ret int64, err error)
|
||||
```
|
||||
|
||||
## 2.ioutil 包
|
||||
|
||||
### 2.1.读取
|
||||
|
|
Loading…
Reference in New Issue