feat: updates, not works
This commit is contained in:
@@ -21,7 +21,7 @@ import (
|
|||||||
const EncFileExt = ".__encfile"
|
const EncFileExt = ".__encfile"
|
||||||
|
|
||||||
var (
|
var (
|
||||||
ErrFileForbiddenFileExt = errors.New("File ext is forbidden")
|
ErrFileForbiddenFileExt = errors.New("file ext is forbidden")
|
||||||
)
|
)
|
||||||
|
|
||||||
type EncFileMeta struct {
|
type EncFileMeta struct {
|
||||||
@@ -177,7 +177,17 @@ func (f *EncFile) Seek(offset int64, whence int) (int64, error) {
|
|||||||
if checkIsFileErr != nil {
|
if checkIsFileErr != nil {
|
||||||
return 0, checkIsFileErr
|
return 0, checkIsFileErr
|
||||||
}
|
}
|
||||||
return f.file.Seek(offset, whence)
|
|
||||||
|
// I do not understand whence
|
||||||
|
if whence != 0 {
|
||||||
|
return 0, fmt.Errorf("not supported whence: %d", whence)
|
||||||
|
}
|
||||||
|
|
||||||
|
ret, err := f.file.Seek(offset, whence)
|
||||||
|
if err != nil {
|
||||||
|
f.filePos = offset
|
||||||
|
}
|
||||||
|
return ret, err
|
||||||
}
|
}
|
||||||
|
|
||||||
func (f *EncFile) Write(p []byte) (n int, err error) {
|
func (f *EncFile) Write(p []byte) (n int, err error) {
|
||||||
|
|||||||
Reference in New Issue
Block a user