Documentation ¶
Index ¶
- Constants
- Variables
- func NewDriver(config config.Config, disk string) (filesystem.Driver, error)
- type Driver
- type File
- func (f *File) Disk(disk string) filesystem.File
- func (f *File) Extension() (string, error)
- func (f *File) File() string
- func (f *File) GetClientOriginalExtension() string
- func (f *File) GetClientOriginalName() string
- func (f *File) HashName(path ...string) string
- func (f *File) LastModified() (time.Time, error)
- func (f *File) MimeType() (string, error)
- func (f *File) Size() (int64, error)
- func (f *File) Store(path string) (string, error)
- func (f *File) StoreAs(path string, name string) (string, error)
- type Local
- func (r *Local) AllDirectories(path string) ([]string, error)
- func (r *Local) AllFiles(path string) ([]string, error)
- func (r *Local) Copy(originFile, targetFile string) error
- func (r *Local) Delete(files ...string) error
- func (r *Local) DeleteDirectory(directory string) error
- func (r *Local) Directories(path string) ([]string, error)
- func (r *Local) Exists(file string) bool
- func (r *Local) Files(path string) ([]string, error)
- func (r *Local) Get(file string) (string, error)
- func (r *Local) GetBytes(file string) ([]byte, error)
- func (r *Local) LastModified(file string) (time.Time, error)
- func (r *Local) MakeDirectory(directory string) error
- func (r *Local) MimeType(file string) (string, error)
- func (r *Local) Missing(file string) bool
- func (r *Local) Move(oldFile, newFile string) error
- func (r *Local) Path(file string) string
- func (r *Local) Put(file, content string) error
- func (r *Local) PutFile(filePath string, source filesystem.File) (string, error)
- func (r *Local) PutFileAs(filePath string, source filesystem.File, name string) (string, error)
- func (r *Local) Size(file string) (int64, error)
- func (r *Local) TemporaryUrl(file string, time time.Time) (string, error)
- func (r *Local) Url(file string) string
- func (r *Local) WithContext(ctx context.Context) filesystem.Driver
- type ServiceProvider
- type Storage
Constants ¶
View Source
const Binding = "goravel.filesystem"
Variables ¶
View Source
var ConfigFacade configcontract.Config
View Source
var StorageFacade filesystemcontract.Storage
Functions ¶
Types ¶
type File ¶
type File struct {
// contains filtered or unexported fields
}
func NewFileFromRequest ¶
func NewFileFromRequest(fileHeader *multipart.FileHeader) (*File, error)
func (*File) GetClientOriginalExtension ¶
func (*File) GetClientOriginalName ¶
type Local ¶
type Local struct {
// contains filtered or unexported fields
}
func (*Local) DeleteDirectory ¶
func (*Local) MakeDirectory ¶
func (*Local) TemporaryUrl ¶
func (*Local) WithContext ¶
func (r *Local) WithContext(ctx context.Context) filesystem.Driver
type ServiceProvider ¶
type ServiceProvider struct { }
func (*ServiceProvider) Boot ¶
func (database *ServiceProvider) Boot(app foundation.Application)
func (*ServiceProvider) Register ¶
func (database *ServiceProvider) Register(app foundation.Application)
type Storage ¶
type Storage struct { filesystem.Driver // contains filtered or unexported fields }
func NewStorage ¶
Click to show internal directories.
Click to hide internal directories.