File tree Expand file tree Collapse file tree 1 file changed +38
-0
lines changed
embedded/appendable/fileutils Expand file tree Collapse file tree 1 file changed +38
-0
lines changed Original file line number Diff line number Diff line change 1+ //go:build freebsd
2+ // +build freebsd
3+
4+ /*
5+ Copyright 2023 Codenotary Inc. All rights reserved.
6+
7+ Licensed under the Apache License, Version 2.0 (the "License");
8+
9+ you may not use this file except in compliance with the License.
10+ You may obtain a copy of the License at
11+
12+ http://www.apache.org/licenses/LICENSE-2.0
13+
14+ Unless required by applicable law or agreed to in writing, software
15+ distributed under the License is distributed on an "AS IS" BASIS,
16+ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
17+ See the License for the specific language governing permissions and
18+ limitations under the License.
19+ */
20+
21+ package fileutils
22+
23+ import "os"
24+
25+ func syncDir (path string ) error {
26+ f , err := os .Open (path )
27+ if err != nil {
28+ return err
29+ }
30+
31+ defer f .Close ()
32+
33+ return f .Sync ()
34+ }
35+
36+ func fdatasync (f * os.File ) error {
37+ return f .Sync ()
38+ }
You can’t perform that action at this time.
0 commit comments