Web.FileAndDirectoryEntries
- Package
- purescript-web-file-directory-entries
- Repository
- xc-jp/purescript-web-file-directory-entries
The File and Directory Entries API WICG Draft Report
- https://wicg.github.io/entries-api
- https://developer.mozilla.org/en-US/docs/Web/API/File_and_Directory_Entries_API/Introduction
See package README for usage examples.
#FileSystemFileEntry Source
data FileSystemFileEntry :: Type
WebKit FileSystemFileEntry
. Represents a file in a file system.
#FileSystemDirectoryEntry Source
data FileSystemDirectoryEntry :: Type
WebKit FileSystemDirectoryEntry
. Represents a directory in a file system.
#getEntries Source
getEntries :: DataTransfer -> Array (Either FileSystemFileEntry FileSystemDirectoryEntry)
Get the DataTransfer
items as WebKit FileSystemEntry
objects.
If any of the DataTransfer
items are not WebKit FileSystemEntry
objects,
then they will not be returned.
#getFile Source
getFile :: FileSystemFileEntry -> Aff File
Returns a File object which can be used to read data from the file
represented by the directory entry.
This must be asynchronous because getFile()
is asynchronous.
#readDirectory Source
readDirectory :: FileSystemDirectoryEntry -> Aff (Array (Either FileSystemFileEntry FileSystemDirectoryEntry))
Read all of the WebKit FileSystemEntry
objects from a
FileSystemDirectoryEntry
.
This must be asynchronous because readEntries()
is asynchronous.
#directoryName Source
directoryName :: FileSystemDirectoryEntry -> String
Returns a USVString
specifying the entry's name.
#directoryPath Source
directoryPath :: FileSystemDirectoryEntry -> String
A USVString
object which provides the full, absolute path from the
file system's root to the entry.
#fileName Source
fileName :: FileSystemFileEntry -> String
Returns a USVString
specifying the entry's name.
#filePath Source
filePath :: FileSystemFileEntry -> String
A USVString
object which provides the full, absolute path from the
file system's root to the entry.
- Modules
- Web.
FileAndDirectoryEntries