First commit

This commit is contained in:
Melon 2021-12-24 01:14:18 +00:00
commit 88d8b292cd
Signed by: melon
GPG Key ID: B0ADD5395BCDAAB6
6 changed files with 61 additions and 0 deletions

8
.idea/.gitignore generated vendored Normal file
View File

@ -0,0 +1,8 @@
# Default ignored files
/shelf/
/workspace.xml
# Editor-based HTTP Client requests
/httpRequests/
# Datasource local storage ignored files
/dataSources/
/dataSources.local.xml

7
.idea/discord.xml generated Normal file
View File

@ -0,0 +1,7 @@
<?xml version="1.0" encoding="UTF-8"?>
<project version="4">
<component name="DiscordProjectSettings">
<option name="show" value="PROJECT_FILES" />
<option name="description" value="" />
</component>
</project>

8
.idea/modules.xml generated Normal file
View File

@ -0,0 +1,8 @@
<?xml version="1.0" encoding="UTF-8"?>
<project version="4">
<component name="ProjectModuleManager">
<modules>
<module fileurl="file://$PROJECT_DIR$/.idea/neutered-filesystem.iml" filepath="$PROJECT_DIR$/.idea/neutered-filesystem.iml" />
</modules>
</component>
</project>

9
.idea/neutered-filesystem.iml generated Normal file
View File

@ -0,0 +1,9 @@
<?xml version="1.0" encoding="UTF-8"?>
<module type="WEB_MODULE" version="4">
<component name="Go" enabled="true" />
<component name="NewModuleRootManager">
<content url="file://$MODULE_DIR$" />
<orderEntry type="inheritedJdk" />
<orderEntry type="sourceFolder" forTests="false" />
</component>
</module>

3
go.mod Normal file
View File

@ -0,0 +1,3 @@
module tea.melonie54.xyz/sean/neutered-filesystem
go 1.17

26
neutered-filesystem.go Normal file
View File

@ -0,0 +1,26 @@
package neutered_filesystem
import (
"net/http"
"os"
)
type NeuteredFileSystem struct {
fs http.FileSystem
}
func (fs NeuteredFileSystem) Open(name string) (http.File, error) {
f, err := fs.fs.Open(name)
if err != nil {
return nil, err
}
return neuteredReaddirFile{f}, nil
}
type neuteredReaddirFile struct {
http.File
}
func (f neuteredReaddirFile) Readdir(count int) ([]os.FileInfo, error) {
return nil, nil
}