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 |
Tags
- coroutines
- Chrono
- SHA1
- program
- ranges
- type_traits
- stringprintf
- Scala
- sprintf
- async
- Observer
- ChromeTab
- c++
- SHA512
- WebView
- web
- Android
- go
- Functional
- Reflect
- design pattern
- traits
- template
- RAII
- AES
- haskell
- sha256
- CustomTab
- Clojure
- kotlin
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