Notice
Recent Posts
Recent Comments
Link
| 일 | 월 | 화 | 수 | 목 | 금 | 토 |
|---|---|---|---|---|---|---|
| 1 | 2 | 3 | 4 | 5 | 6 | |
| 7 | 8 | 9 | 10 | 11 | 12 | 13 |
| 14 | 15 | 16 | 17 | 18 | 19 | 20 |
| 21 | 22 | 23 | 24 | 25 | 26 | 27 |
| 28 | 29 | 30 | 31 |
Tags
- ranges
- type_traits
- async
- SHA512
- coroutines
- SHA1
- program
- Reflect
- haskell
- sha256
- go
- sprintf
- Functional
- Observer
- Chrono
- CustomTab
- WebView
- kotlin
- design pattern
- c++
- AES
- traits
- Scala
- Android
- ChromeTab
- Clojure
- template
- web
- stringprintf
- RAII
Archives
- Today
- Total
목록File (1)
프로그래밍 검색 블로그
go 파일 압축
package main import ( "archive/zip" "io" "io/ioutil" "os" "path/filepath" ) // ZipDir 폴더를 지정해서 그 폴더 안에 있는 파일들을 // saveFile에 저장합니다 // error nil 압축성공 // 그외: 압축 실패 func ZipDir(saveFile *os.File, savePath string) error { zipWriter := zip.NewWriter(saveFile) defer zipWriter.Close() z := zipType{zipWriter} return z.dir(savePath, "") } func main() { //실행 파일과 같은 위치에 있는 test폴더 안에 있는 요소를 //result.zip으로 압축..
go
2018. 5. 12. 16:54