Discover Packages
github.com/nabeken/go-copyfs
package
module
Version:
v0.1.0
Opens a new window with list of versions in this module.
Published: May 15, 2022
License: BSD-3-Clause
Opens a new window with license information.
Imports: 6
Opens a new window with list of imports.
Imported by: 0
Opens a new window with list of known importers.
README
README
¶
go-copyfs
go-copyfs
is a library to copy a given fs.FS
into the local filesystem.
Note : go-copyfs
doesn't support the symlink because fs.FS
doesn't support as of Go 1.18 .
Motivation
When I was writing tests, I wanted to extract files in embed.FS
into the local filesystem because the code only accept a filename in the local filesystem. I had to write some code to deal with the temporary directory and copy the files into it.
That's why I wrote this small library, go-copyfs
.
Usage
See copyfs_test.go
License
See LICENSE
Expand ▾
Collapse ▴
Documentation
¶
CopyFS copies contents in the srcFS fs.FS into the local filesystem at destDir. destDir must be a directory.
Source Files
¶
Click to show internal directories.
Click to hide internal directories.