Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Wrap the current mobile code in the new repository scheme
- Loading branch information
1 parent
febdb5f
commit 1e1b49b
Showing
5 changed files
with
57 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,34 @@ | ||
package gomobile | ||
|
||
import ( | ||
"fyne.io/fyne" | ||
) | ||
|
||
type mobileFileRepo struct { | ||
driver *mobileDriver | ||
} | ||
|
||
func (m *mobileFileRepo) Exists(u fyne.URI) (bool, error) { | ||
return true, nil // TODO check a file exists | ||
} | ||
|
||
func (m *mobileFileRepo) Reader(u fyne.URI) (fyne.URIReadCloser, error) { | ||
return m.driver.FileReaderForURI(u) | ||
} | ||
|
||
func (m *mobileFileRepo) CanRead(u fyne.URI) (bool, error) { | ||
return true, nil // TODO check a file can be read | ||
} | ||
|
||
func (m *mobileFileRepo) Destroy(string) { | ||
} | ||
|
||
func (m *mobileFileRepo) CanList(u fyne.URI) (bool, error) { | ||
return canListURI(u), nil | ||
} | ||
|
||
func (m *mobileFileRepo) List(u fyne.URI) ([]fyne.URI, error) { | ||
return listURI(u) | ||
} | ||
|
||
// TODO add write support (not yet supported on mobile) |