File tree Expand file tree Collapse file tree 3 files changed +26
-1
lines changed Expand file tree Collapse file tree 3 files changed +26
-1
lines changed Original file line number Diff line number Diff line change 1+ // +build !js
2+
13// Package osfs provides a billy filesystem for the OS.
24package osfs // import "github.com/go-git/go-billy/v5/osfs"
35
Original file line number Diff line number Diff line change 1+ package osfs
2+
3+ import (
4+ "github.com/go-git/go-billy/v5"
5+ "github.com/go-git/go-billy/v5/helper/chroot"
6+ "github.com/go-git/go-billy/v5/memfs"
7+ )
8+
9+ // globalMemFs is the global memory fs
10+ var globalMemFs = memfs .New ()
11+
12+ const (
13+ defaultDirectoryMode = 0755
14+ defaultCreateMode = 0666
15+ )
16+
17+ // OS is a filesystem shim for js.
18+ type OS struct {}
19+
20+ // New returns a new OS filesystem.
21+ func New (baseDir string ) billy.Filesystem {
22+ return chroot .New (globalMemFs , baseDir )
23+ }
Original file line number Diff line number Diff line change 1- // +build !plan9,!windows
1+ // +build !plan9,!windows,!js
22
33package osfs
44
You can’t perform that action at this time.
0 commit comments