Some information about a document. More...
#include <juce_AndroidDocument.h>

Public Member Functions | |
| AndroidDocumentInfo ()=default | |
| bool | canCopy () const |
| True if this document can be copied. | |
| bool | canCreateChildren () const |
| True if this is a directory and adding child documents is supported. | |
| bool | canDelete () const |
| True if this document can be removed completely from the filesystem. | |
| bool | canMove () const |
| True if this document can be moved. | |
| bool | canRead () const |
| True if this process has permission to read this file. | |
| bool | canRename () const |
| True if this document can be renamed. | |
| bool | canWrite () const |
| True if this is a document that can be written, or a directory that can be modified. | |
| bool | exists () const |
| True if this file really exists. | |
| int64 | getLastModified () const |
| Timestamp when a document was last modified, in milliseconds since January 1, 1970 00:00:00.0 UTC. | |
| String | getName () const |
| The user-facing name. | |
| int64 | getSizeInBytes () const |
| The size of the document in bytes, if known. | |
| String | getType () const |
| The MIME type of this document. | |
| bool | isDirectory () const |
| True if this is a directory rather than a file. | |
| bool | isFile () const |
| True if this is a file rather than a directory. | |
| bool | isLastModifiedValid () const |
| True if the filesystem provided a modification time. | |
| bool | isSizeInBytesValid () const |
| True if the filesystem provided a size in bytes. | |
| bool | isVirtual () const |
| True if this document isn't a physical file on storage. | |
Private Types | |
| enum | { flagSupportsWrite = 0x0002 , flagSupportsDelete = 0x0004 , flagDirSupportsCreate = 0x0008 , flagSupportsRename = 0x0040 , flagSupportsCopy = 0x0080 , flagSupportsMove = 0x0100 , flagVirtualDocument = 0x0200 } |
| enum | { flagExists = 1 << 0 , flagValidModified = 1 << 1 , flagValidSize = 1 << 2 , flagHasReadPermission = 1 << 3 , flagHasWritePermission = 1 << 4 } |
Private Member Functions | |
| AndroidDocumentInfo (Args) | |
| bool | isJuceFlagSet (int flag) const |
| bool | isNativeFlagSet (int flag) const |
Private Attributes | |
| int | juceFlags = 0 |
| int64 | lastModified = 0 |
| String | name |
| int | nativeFlags = 0 |
| int64 | sizeInBytes = 0 |
| String | type |
Some information about a document.
Each instance represents some information about the document at the point when the instance was created.
Instance information is not updated automatically. If you think some file information may have changed, create a new instance.
@tags{Core}
|
private |
|
private |
|
default |
|
explicitprivate |
|
inline |
True if this document can be copied.
References flagSupportsCopy, and isNativeFlagSet().
|
inline |
True if this is a directory and adding child documents is supported.
References flagDirSupportsCreate, and isNativeFlagSet().
|
inline |
True if this document can be removed completely from the filesystem.
References flagSupportsDelete, and isNativeFlagSet().
|
inline |
True if this document can be moved.
References flagSupportsMove, and isNativeFlagSet().
|
inline |
True if this process has permission to read this file.
If this returns true, and the AndroidDocument refers to a file rather than a directory, then AndroidDocument::createInputStream should work on this document.
References flagHasReadPermission, isJuceFlagSet(), juce::String::isNotEmpty(), and type.
|
inline |
True if this document can be renamed.
References flagSupportsRename, and isNativeFlagSet().
|
inline |
True if this is a document that can be written, or a directory that can be modified.
If this returns true, and the AndroidDocument refers to a file rather than a directory, then AndroidDocument::createOutputStream should work on this document.
References flagDirSupportsCreate, flagHasWritePermission, flagSupportsDelete, flagSupportsWrite, isJuceFlagSet(), isNativeFlagSet(), juce::String::isNotEmpty(), and type.
|
inline |
True if this file really exists.
References flagExists, and isJuceFlagSet().
|
inline |
Timestamp when a document was last modified, in milliseconds since January 1, 1970 00:00:00.0 UTC.
Use isLastModifiedValid() to determine whether or not the result of this function is valid.
References flagValidModified, isJuceFlagSet(), and lastModified.
|
inline |
|
inline |
The size of the document in bytes, if known.
Use isSizeInBytesValid() to determine whether or not the result of this function is valid.
References flagValidSize, isJuceFlagSet(), and sizeInBytes.
|
inline |
The MIME type of this document.
References isDirectory(), and type.
| bool juce::AndroidDocumentInfo::isDirectory | ( | ) | const |
|
inline |
True if this is a file rather than a directory.
References isDirectory(), juce::String::isNotEmpty(), and type.
|
inlineprivate |
References juceFlags.
Referenced by canRead(), canWrite(), exists(), getLastModified(), getSizeInBytes(), isLastModifiedValid(), and isSizeInBytesValid().
|
inline |
True if the filesystem provided a modification time.
References flagValidModified, and isJuceFlagSet().
|
inlineprivate |
References nativeFlags.
Referenced by canCopy(), canCreateChildren(), canDelete(), canMove(), canRename(), canWrite(), and isVirtual().
|
inline |
True if the filesystem provided a size in bytes.
References flagValidSize, and isJuceFlagSet().
|
inline |
True if this document isn't a physical file on storage.
References flagVirtualDocument, and isNativeFlagSet().
|
private |
Referenced by isJuceFlagSet().
|
private |
Referenced by getLastModified().
|
private |
Referenced by isNativeFlagSet().
|
private |
Referenced by getSizeInBytes().
|
private |
Referenced by canRead(), canWrite(), getType(), and isFile().