se

package
v0.1.3 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Mar 3, 2024 License: Apache-2.0 Imports: 14 Imported by: 0

Documentation

Index

Constants

View Source
const FILEDIR = "/data/index/"

Variables

This section is empty.

Functions

func ArrayUnique

func ArrayUnique(arr []string) []string

func CopyFile

func CopyFile(src, dst string) (int64, error)

func DirCHeckAndMk

func DirCHeckAndMk(dir string)

func ExistFile

func ExistFile(path string) bool

ExistFile 判断所给的路径文件/文件夹是否存在

func FileExist

func FileExist(filePath string) bool

func GetMd5

func GetMd5(filePath string) string

func GetPath

func GetPath() string

GetPath 获取当前程序目录

func GetWd

func GetWd() string

func IntToBytes

func IntToBytes(n int) []byte

func StrToBytes

func StrToBytes(s string) []byte

func StrToMd5

func StrToMd5(str string) string

func Tmd5

func Tmd5() string

func Walk

func Walk(dirPath string) []string

Types

type FileHandler

type FileHandler struct {
	// contains filtered or unexported fields
}

func NewFileHandler

func NewFileHandler(field string) *FileHandler

NewFileHandler 一个字段一个文件

func (*FileHandler) ReadDocIdsArray added in v0.1.1

func (fh *FileHandler) ReadDocIdsArray(start, len int64) []int64

ReadDocIdsArray 从start下标读取len个int64

func (*FileHandler) ReadInt64

func (fh *FileHandler) ReadInt64(start int64) int64

ReadInt64 从指定的位置读取一个int64

func (*FileHandler) WriteInt64

func (fh *FileHandler) WriteInt64(value, start int64) int64

WriteInt64 指定的地方写入int64,不传就获取文件最后的下标

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL