2019-08-19 20:43:26 -05:00
|
|
|
package main
|
|
|
|
|
2019-09-27 23:32:20 -05:00
|
|
|
import (
|
|
|
|
"fmt"
|
|
|
|
"os"
|
|
|
|
"path/filepath"
|
|
|
|
"time"
|
|
|
|
)
|
2019-08-19 20:43:26 -05:00
|
|
|
|
|
|
|
func timeToString(currentTime time.Time) string {
|
|
|
|
return currentTime.String()
|
|
|
|
}
|
2019-09-27 23:32:20 -05:00
|
|
|
|
|
|
|
func osfileToSting(currentOsFile *os.File) string {
|
|
|
|
file, err := os.Open(currentOsFile.Name())
|
|
|
|
|
|
|
|
fileinfo, err := file.Stat()
|
|
|
|
|
|
|
|
if err != nil {
|
|
|
|
fmt.Printf("Heyo, there's no file here!\n")
|
|
|
|
}
|
|
|
|
|
|
|
|
name := fileinfo.Name()
|
|
|
|
return name
|
|
|
|
}
|
|
|
|
|
|
|
|
func slashSeperator(unslashed string) string {
|
|
|
|
s := unslashed
|
|
|
|
_, file := filepath.Split(s)
|
|
|
|
return file
|
|
|
|
}
|