-
Notifications
You must be signed in to change notification settings - Fork 0
/
main.go
61 lines (42 loc) · 1.26 KB
/
main.go
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
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
package main
import (
"fmt"
"github.com/foysal-mamun/files-with-go/files"
//"time"
)
func main() {
fmt.Println("files")
//files.CreateEmptly("test.txt")
//files.Truncate("test.txt", 100)
//files.GetInfo("test.txt")
//files.Move("test.txt", "text.txt")
//files.GetInfo("text.txt")
//files.Delete("text.txt")
//files.Open("test.txt1")
//files.CheckPermission("test.txt")
//files.ChangePermission("test.txt", 0777)
//files.ChangeOwnership("test.txt", 0, 0)
//files.ChangeTime("test.txt", time.Now(), time.Now())
/*
err := files.Copy("test.txt", "text.txt")
if err != nil {
fmt.Println("Copy File failed %q", err)
} else {
fmt.Println("Copy file succeeded")
}
*/
/*
pos := files.Seek("test.txt", 5, 0)
fmt.Println("New file position:: ", pos)
*/
//files.Write("test.txt", []byte("foysal\n"))
//files.Read("test.txt", 4)
//files.CreateArchiveFile("test.zip", []string{"test.txt", "test1.txt"})
//files.ExtractArchiveFile("test.zip", "/Users/foysal/Desktop")
//files.CompressFile("test.txt.gz", "test.txt")
//files.UncompressFile("test.txt.gz", "text.txt")
//files.CerateTempFile("text.tmp")
//files.FileFromHTTP("test.html", "http://www.google.com")
//files.ChecksumFileContent("text.txt")
//files.ChecksumFile("text.txt")
}