Documentation ¶
Index ¶
- func AccessGet(inputs []string) string
- func AccessPost(inputs []string) string
- func CreateFolderIfNotExists(folderName string) bool
- func Decrypt(ciphertext string, key []byte) (string, error)
- func Encrypt(plaintext string, key []byte) (string, error)
- func Error(text, path string)
- func ErrorStop(text, path string)
- func GetAppDir() string
- func GetUid(uid string) string
- func IsJSON(s string) bool
- func Log(text, path string)
- func LogStop(text, path string)
- func RandNum(min, max int) int
- type FileQueue
- func (fq *FileQueue) AppendToFile(data string)
- func (fq *FileQueue) Copy(newName string) bool
- func (fq *FileQueue) DeleteFile() bool
- func (fq *FileQueue) DeleteFolder() bool
- func (fq *FileQueue) DirExists() bool
- func (fq *FileQueue) Download(url string) bool
- func (fq *FileQueue) FileExists() bool
- func (fq *FileQueue) GetDirSize() (int64, error)
- func (fq *FileQueue) GetFileList(t string) ([]string, error)
- func (fq *FileQueue) GetFileSize() (int64, error)
- func (fq *FileQueue) ReadFile() (string, error)
- func (fq *FileQueue) ReadFileByte() ([]byte, error)
- func (fq *FileQueue) ReadFileExt() string
- func (fq *FileQueue) ReadFileKey(key string) (string, error)
- func (fq *FileQueue) ReadFileKeyList() ([]map[string]string, error)
- func (fq *FileQueue) ReadFromFile() (string, error)
- func (fq *FileQueue) Rename(newName string) bool
- func (fq *FileQueue) SetPath(FileName string) *FileQueue
- func (fq *FileQueue) UnZip(dest string) bool
- func (fq *FileQueue) WriteFileByte(data []byte)
- func (fq *FileQueue) WriteFileKey(key, value string) error
- func (fq *FileQueue) WriteToFile(data string)
- func (fq *FileQueue) ZipFolder(destZip string) bool
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func AccessPost ¶
func CreateFolderIfNotExists ¶
CreateFolderIfNotExists 检查并创建文件夹,返回是否成功创建
Types ¶
type FileQueue ¶
type FileQueue struct {
FileName string
}
file
func (*FileQueue) AppendToFile ¶
AppendToFile 向文件追加数据
func (*FileQueue) DeleteFolder ¶
DeleteFolder 删除文件夹及其所有内容,并返回是否成功删除
func (*FileQueue) GetFileList ¶
GetFileList 函数用于获取指定文件夹中的文件列表
func (*FileQueue) GetFileSize ¶
GetFileSize 返回文件的大小
func (*FileQueue) ReadFileByte ¶
ReadFileByte 从文件完整读取数据并返回字节切片
func (*FileQueue) ReadFileKey ¶
ReadFileKey 从文件中读取与给定键相关联的值
func (*FileQueue) ReadFileKeyList ¶
ReadFileKeyList 从文件中读取所有键值对并返回一个 []map[string]string
func (*FileQueue) ReadFromFile ¶
ReadFromFile 从文件读取数据
func (*FileQueue) WriteFileByte ¶
WriteFileByte 向文件写入数据
func (*FileQueue) WriteFileKey ¶
WriteFileKey 将键值对写入文件
Click to show internal directories.
Click to hide internal directories.