Documentation
¶
Index ¶
- func DirectorySize(path string) (int64, error)
- func FileExists(path string) bool
- func FileSize(path string) int64
- func SaveCsv(filePath string, data [][]string) bool
- func SaveCsvAsync(filePath string, data [][]string, ch chan bool)
- type DoubleArrayString
- type File
- func (f File) CreateServer(host string, port uint16)
- func (f *File) DownloadNetImage(saveDir string, imageUrl string) error
- func (f *File) DownloadNetImageMany(saveDir string, imageUrls []string)
- func (f *File) ExcelAddChart(sheetName string, cellName string, jsonData string) (err error)
- func (f *File) ExcelAddPicture(sheetName string, cellName string, img string, jsonConfig string) (err error)
- func (f *File) ExcelClose() (err error)
- func (f *File) ExcelNew(config FileExcelConfig)
- func (f *File) ExcelNewSheet(name string) int
- func (f *File) ExcelSave() error
- func (f *File) ExcelSetActiveSheet(sheetIndex int)
- func (f *File) ExcelSetCellValue(sheet string, cell string, value interface{}) error
- func (f File) Exit()
- func (f *File) GetCellValue(sheetName string, cellName string) (value string, err error)
- func (f *File) GetSheetData(sheetName string) (data [][]string, err error)
- func (f File) RecvFile(conn net.Conn, fileName string)
- func (f File) SendFile(host string, port uint16, path string, name string)
- type FileConfig
- type FileExcelConfig
- type ICsv
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
Types ¶
type DoubleArrayString ¶
type DoubleArrayString struct {
Data [][]string
}
二维字符串切片结构体
func (*DoubleArrayString) SaveCsv ¶
func (das *DoubleArrayString) SaveCsv(filepath string)
实现保存为CSV的方法
type File ¶
type File struct {
// contains filtered or unexported fields
}
File 文件对象
func (File) CreateServer ¶
CreateServer 创建文件服务器 @param host 文件服务器主机地址,可以收0.0.0.0 @param port 文件服务器端口号
func (*File) DownloadNetImage ¶
DownloadNetImage 下载网络图片
func (*File) DownloadNetImageMany ¶
DownloadNetImageMany 批量下载图片
func (*File) ExcelAddChart ¶
ExcelAddChart 添加图表到Excel
func (*File) ExcelAddPicture ¶
func (*File) ExcelClose ¶
func (*File) ExcelSetActiveSheet ¶
ExcelSetActiveSheet 激活单元格
func (*File) ExcelSetCellValue ¶
ExcelSetCellValue 设置单元格的值
func (*File) GetCellValue ¶
GetCellValue 读取单元格数据
func (*File) GetSheetData ¶
GetSheetData 读取整张工作簿
type FileConfig ¶
FileConfig 文件配置
type FileExcelConfig ¶
type FileExcelConfig struct {
FileName string // 文件名
}
FileExcelConfig excel文件配置
Source Files
¶
Directories
¶
| Path | Synopsis |
|---|---|
|
examples
|
|
|
z01_save_csv
command
|
|
|
z02_file_server/client
command
|
|
|
z02_file_server/server
command
|
Click to show internal directories.
Click to hide internal directories.