forked from fyne-io/fyne
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathuri.go
45 lines (39 loc) · 1.09 KB
/
uri.go
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
package fyne
import (
"fmt"
"io"
)
// URIReadCloser represents a cross platform data stream from a file or provider of data.
// It may refer to an item on a filesystem or data in another application that we have access to.
type URIReadCloser interface {
io.ReadCloser
// Deprecated, use URI().Name() instead
Name() string
URI() URI
}
// URIWriteCloser represents a cross platform data writer for a file resource.
// This will normally refer to a local file resource.
type URIWriteCloser interface {
io.WriteCloser
// Deprecated, use URI().Name() instead
Name() string
URI() URI
}
// URI represents the identifier of a resource on a target system.
// This resource may be a file or another data source such as an app or file sharing system.
type URI interface {
fmt.Stringer
Extension() string
Name() string
MimeType() string
Scheme() string
}
// ListableURI represents a URI that can have child items, most commonly a
// directory on disk in the native filesystem.
//
// Since: 1.4
type ListableURI interface {
URI
// List returns a list of child URIs of this URI.
List() ([]URI, error)
}