Skip to content

Commit

Permalink
🔥 Remove WriteFileWithoutChangeTime func siyuan-note/siyuan#9846
Browse files Browse the repository at this point in the history
  • Loading branch information
88250 committed Dec 9, 2023
1 parent 0079f15 commit ecf23a6
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 15 deletions.
12 changes: 0 additions & 12 deletions filelock.go
Original file line number Diff line number Diff line change
Expand Up @@ -149,18 +149,6 @@ func ReadFile(filePath string) (data []byte, err error) {
return
}

func WriteFileWithoutChangeTime(filePath string, data []byte) (err error) {
lock(filePath)
defer unlock(filePath)

err = gulu.File.WriteFileSaferWithoutChangeTime(filePath, data, 0644)
if isDenied(err) {
logging.LogFatalf(logging.ExitCodeFileSysErr, "write file [%s] failed: %s", filePath, err)
return
}
return
}

func WriteFile(filePath string, data []byte) (err error) {
lock(filePath)
defer unlock(filePath)
Expand Down
2 changes: 1 addition & 1 deletion go.mod
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ module github.com/siyuan-note/filelock
go 1.18

require (
github.com/88250/gulu v1.2.3-0.20231208041529-dafc64f2bd1d
github.com/88250/gulu v1.2.3-0.20231209020950-b7b6994e395c
github.com/siyuan-note/logging v0.0.0-20231030034701-8265764f00ff
)

Expand Down
4 changes: 2 additions & 2 deletions go.sum
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
github.com/88250/gulu v1.2.3-0.20231208041529-dafc64f2bd1d h1:5v2fUykQ2LHVLjYH6hitmpGQ4q9NIFTzdncnI7TNkaY=
github.com/88250/gulu v1.2.3-0.20231208041529-dafc64f2bd1d/go.mod h1:pTWnjt+6qUqNnP9xltswsJxgCBVu3C7eW09u48LWX0k=
github.com/88250/gulu v1.2.3-0.20231209020950-b7b6994e395c h1:Fas3hxqP33xA9KKDV50jUmppiiOukk5bdV00Hk5VSSk=
github.com/88250/gulu v1.2.3-0.20231209020950-b7b6994e395c/go.mod h1:pTWnjt+6qUqNnP9xltswsJxgCBVu3C7eW09u48LWX0k=
github.com/davecgh/go-spew v1.1.1 h1:vj9j/u1bqnvCEfJOwUhtlOARqs3+rkHYY13jYWTU97c=
github.com/getsentry/sentry-go v0.25.0 h1:q6Eo+hS+yoJlTO3uu/azhQadsD8V+jQn2D8VvX1eOyI=
github.com/getsentry/sentry-go v0.25.0/go.mod h1:lc76E2QywIyW8WuBnwl8Lc4bkmQH4+w1gwTf25trprY=
Expand Down

0 comments on commit ecf23a6

Please sign in to comment.