diff --git a/files/backblaze.go b/files/backblaze.go index 5495911..95b2f52 100644 --- a/files/backblaze.go +++ b/files/backblaze.go @@ -140,10 +140,6 @@ func (bp *BackblazeProvider) GetDirectory(path string) Directory { return finalDir } -func (bp *BackblazeProvider) FilePath(path string) string { - return "" -} - func (bp *BackblazeProvider) SendFile(path string, w io.Writer) (stream io.Reader, contenttype string, err error) { client := &http.Client{} // Get bucket name >:( diff --git a/files/fileprovider.go b/files/fileprovider.go index ebf3a61..f7df85c 100644 --- a/files/fileprovider.go +++ b/files/fileprovider.go @@ -38,7 +38,6 @@ type FileInfo struct { type FileProviderInterface interface { Setup(args map[string]string) (ok bool) GetDirectory(path string) (directory Directory) - FilePath(path string) (realpath string) SendFile(path string, writer io.Writer) (stream io.Reader, contenttype string, err error) SaveFile(file io.Reader, filename string, path string) (ok bool) ObjectInfo(path string) (exists bool, isDir bool, location string) @@ -58,11 +57,6 @@ func (f FileProvider) GetDirectory(path string) Directory { return Directory{} } -// FilePath returns the path to the file, whether it be a URL or local file path. -func (f FileProvider) FilePath(path string) string { - return "" -} - // RemoteFile will bypass http.ServeContent() and instead write directly to the response. func (f FileProvider) SendFile(path string, writer io.Writer) (stream io.Reader, contenttype string, err error) { return diff --git a/files/files_test.go b/files/files_test.go index 5ccacfd..2fdf8be 100644 --- a/files/files_test.go +++ b/files/files_test.go @@ -24,10 +24,6 @@ func TestFileProvider(t *testing.T) { t.Errorf("Default FileProvider GetDirectory() files returned %v, expected none.", getdirectory.Files) } - filepath := fp.FilePath(""); if filepath != "" { - t.Errorf("Default FileProvider FilePath() %v, expected nothing.", filepath) - } - savefile := fp.SaveFile(nil, "", ""); if savefile != false { t.Errorf("Default FileProvider SaveFile() attempted to save a file.") } @@ -87,10 +83,6 @@ func TestDiskProvider(t *testing.T) { t.Errorf("DiskProvider GetDirectory() files returned %v, expected 1.", getdirectory.Files) } - filepath := dp.FilePath("testing.txt"); if filepath != DISK_TESTING_GROUNDS + "/testing.txt"{ - t.Errorf("DiskProvider FilePath() returned %v, expected path.", filepath) - } - testfile := bytes.NewReader([]byte("second test file!")) savefile := dp.SaveFile(testfile, "second_test.txt", ""); if savefile != true { t.Errorf("DiskProvider SaveFile() could not save a file.")