diff --git a/Software/Development/Language/Go/Basic/Go_文件操作.md b/Software/Development/Language/Go/Basic/Go_文件操作.md index d3809dc..36debf7 100644 --- a/Software/Development/Language/Go/Basic/Go_文件操作.md +++ b/Software/Development/Language/Go/Basic/Go_文件操作.md @@ -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.读取