Documentation ¶
Index ¶
- Variables
- type Storage
- func (s *Storage) CopyFromTmpToPrefixStorage(tmpFileNameOrPath string) (string, error)
- func (s *Storage) GenerateNewPathToTmpFile(ext string) string
- func (s *Storage) GenerateNewTmpFileName(ext string) string
- func (s *Storage) GetPrefixPathToFile(fileName string) (string, error)
- func (s *Storage) GetTmpPathToFile(fileName string) string
- func (s *Storage) Init() error
- func (s *Storage) RemovePrefixFile(fileName string) error
- func (s *Storage) RemoveTmpFile(file string) error
- func (s *Storage) SaveToTmp(src io.Reader, ext string) (string, error)
Constants ¶
This section is empty.
Variables ¶
View Source
var (
ErrFileAlreadyExists = errors.New("file already exists")
)
Functions ¶
This section is empty.
Types ¶
type Storage ¶
type Storage struct {
// contains filtered or unexported fields
}
Storage is a file system storage
func (*Storage) CopyFromTmpToPrefixStorage ¶
CopyFromTmpToPrefixStorage moves file from tmp to prefix storage returns name of the saved file in prefix storage
func (*Storage) GenerateNewPathToTmpFile ¶
GenerateNewPathToTmpFile generetes full path to the new tmp file
func (*Storage) GenerateNewTmpFileName ¶
GenerateNewTmpFileName generetes name of the new tmp file
func (*Storage) GetPrefixPathToFile ¶
GetPrefixPathToFile returns full path of the prefix file
func (*Storage) GetTmpPathToFile ¶
GetTmpPathToFile returns full path of the tmp file
func (*Storage) RemovePrefixFile ¶
RemovePrefixFile removes file in the prefix storage
func (*Storage) RemoveTmpFile ¶
RemoveTmpFile removes file in the tmp storage
Click to show internal directories.
Click to hide internal directories.