gofs

command module
v0.3.2 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Mar 3, 2025 License: MIT Imports: 20 Imported by: 0

README

Gofs

A simple static file server inspired by dufs. gofs uses very little JavaScript (only for drag and drop), this allows it to work even on browsers with limited capabilities (for example, browser on some e-reader devices).

image

Demo

https://github.com/user-attachments/assets/5a02fe4c-2ae4-485b-8860-d60071ebee8d

Install

With go
go install github.com/ndtoan96/gofs@latest
Pre-built binary

You can download pre-built binary in the release page

Features

  • Serve static files
  • Create folder
  • Delete files/folders
  • Archive
  • Rename
  • Upload
  • Download
  • Copy/Cut/Paste
  • Edit
  • Support https
  • Drag and drop
  • Serve index.html
  • Sorting
  • Searching (plain text search or glob pattern search)
  • Preview (markdown, text, code, image, pdf, zip)

Usage

Usage of gofs:
  -d, --dir string        Directory to serve (default ".")
  -h, --host string       Host address to listen (default "[::]")
  -i, --index             Render index.html
  -p, --port int          Port to listen (default 8080)
      --tsl-cert string   Path to an SSL/TLS certificate to serve with HTTPS
      --tsl-key string    Path to an SSL/TLS certificate's private key
  -w, --write             Allow write access

Example

Serve current directory in read-only mode

gofs

Serve current directory in write mode (allow copy, paste, rename, edit, delete,...)

gofs -w

Serve directory xxx

gofs xxx

Use a different port (default is 8080)

gofs -p 7777

Documentation

The Go Gopher

There is no documentation for this package.

Directories

Path Synopsis

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL
JackTT - Gopher 🇻🇳