Documentation
¶
Index ¶
- func Download(fileURL string) error
- func DownloadFile(fileURL string, savePath string) error
- func DownloadURL(parsedFile *url.URL, savePath string) error
- func Exists(path string) bool
- func GetFileReader(fileToGet string) (io.ReadCloser, error)
- func GetURLReader(parsedFile *url.URL) (io.ReadCloser, error)
- func HTTPServer(serverAddr, srvDir string, allowPut bool, uploadToken string) error
- func PrintFileList(files []FileInfo)
- func UploadFile(remoteServer, authToken, filePath string) error
- type FileInfo
- type MyResponseWriter
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func DownloadFile ¶
func GetFileReader ¶
func GetFileReader(fileToGet string) (io.ReadCloser, error)
func GetURLReader ¶
func GetURLReader(parsedFile *url.URL) (io.ReadCloser, error)
func HTTPServer ¶
func PrintFileList ¶
func PrintFileList(files []FileInfo)
PrintFileList prints the file list in a format similar to 'ls'.
func UploadFile ¶
Types ¶
type FileInfo ¶
type FileInfo struct {
Name string
Size int64
IsDirectory bool
Permissions string // Unix-like permissions string
}
FileInfo represents file information for listing
func GetFileInfo ¶
GetFileInfo retrieves file information for a given path. It handles errors and provides consistent output across platforms.
type MyResponseWriter ¶
type MyResponseWriter struct {
http.ResponseWriter
}
Click to show internal directories.
Click to hide internal directories.