package
Version:
v1.0.0
Opens a new window with list of versions in this module.
Published: May 17, 2026
License: MIT
Opens a new window with license information.
Imports: 2
Opens a new window with list of imports.
Imported by: 1
Opens a new window with list of known importers.
README
¶
files — filesystem helpers
import "github.com/downsized-devs/sdk-go/files"
Stability: Stable — see STABILITY.md
Features
GetExtension(filename string) string — extension after the last dot, lowercased.
IsExist(filename string) bool — file existence check.
Installation
go get github.com/downsized-devs/sdk-go/files
Quick Start
import "github.com/downsized-devs/sdk-go/files"
_ = files.GetExtension("/tmp/report.PDF") // "pdf"
_ = files.IsExist("/tmp/report.pdf") // true/false
API Reference
| Symbol |
Signature |
GetExtension |
(filename string) string |
IsExist |
(filename string) bool |
Dependencies
stdlib only.
Testing
go test ./files/...
Contributing
See CONTRIBUTING.md.
Documentation
¶
Extract file extension e.g. "txt, csv, docx" from full filename.
If file has no extension then return empty string
Checks if a file exists and is not a directory
Source Files
¶
Click to show internal directories.
Click to hide internal directories.