BlackBerry Dynamics for Xamarin Forms  7.0.0.22
Runtime library for Xamarin Forms applications
BBDXamarinForms.Common.Interfaces.SecureStorage.IBBDFileEntry Interface Reference

An interface representing a file entry on the BBD secure file system. More...

Public Member Functions

Task< IBBDMetadataGetMetadataAsync ()
 Gets state of a file entry on the BBD secure file system. More...
 
Task< string > ReadAllTextAsync ()
 Reads file in the secure store as string. More...
 
Task WriteAllTextAsync (string contents)
 Writes string to the single file in the secure store. More...
 
Task< byte[]> ReadAllDataAsync ()
 Reads file in the secure store as byte array. More...
 
Task WriteAllDataAsync (byte[] data)
 Writes byte array to the single file in the secure store. More...
 
Task< bool > RemoveAsync ()
 Deletes a file. More...
 
Task< IBBDDirectoryEntryGetParentAsync ()
 Looks up the parent IBBDDirectoryEntry of this entry. More...
 
Task< IBBDFileEntryCopyAsync (string destination, string newName="")
 Copies a file to a different location on the file system. More...
 
Task< IBBDFileEntryMoveAsync (string destination, string newName="")
 Moves a file to a different location on the file system. More...
 
Task< IBBDFileEntryRenameAsync (string newName)
 Renames a filename. More...
 

Properties

string Name [get]
 Gets the file entry name. More...
 
string FullPath [get]
 Gets the full path. More...
 
string EncryptedFullPath [get]
 Gets the enrypted full path. More...
 
IBBDFileSystem FileSystem [get]
 Gets the BBD secure file system interface. IBBDFileSystem class. More...
 

Detailed Description

An interface representing a file entry on the BBD secure file system.

Member Function Documentation

Task<IBBDFileEntry> BBDXamarinForms.Common.Interfaces.SecureStorage.IBBDFileEntry.CopyAsync ( string  destination,
string  newName = "" 
)

Copies a file to a different location on the file system.

Exceptions
Exceptions.BBDFileSystemExceptionThrown if there is already a file or directory at the destination.
Parameters
destinationThe directory to which to copy the file.
newNameThe new name of the file. Defaults to the current name if unspecified.
Returns
Newly copied IBBDFileEntry.
Task<IBBDMetadata> BBDXamarinForms.Common.Interfaces.SecureStorage.IBBDFileEntry.GetMetadataAsync ( )

Gets state of a file entry on the BBD secure file system.

Exceptions
Exceptions.BBDFileSystemExceptionThrown when error occurs.
Returns
IBBDMetadata interface.
Task<IBBDDirectoryEntry> BBDXamarinForms.Common.Interfaces.SecureStorage.IBBDFileEntry.GetParentAsync ( )

Looks up the parent IBBDDirectoryEntry of this entry.

Exceptions
Exceptions.BBDFileSystemExceptionThrown if an error occurs when attempting to get the parent.
Returns
IBBDDirectoryEntry
Task<IBBDFileEntry> BBDXamarinForms.Common.Interfaces.SecureStorage.IBBDFileEntry.MoveAsync ( string  destination,
string  newName = "" 
)

Moves a file to a different location on the file system.

Exceptions
Exceptions.BBDFileSystemExceptionThrown if there is already a file or directory at the destination (except to move to the same filename).
Parameters
destinationThe directory to which to move the file.
newNameThe new name of the file. Defaults to the current name if unspecified.
Returns
Newly moved IBBDFileEntry or this if moved to the same location without name changing.
Task<byte[]> BBDXamarinForms.Common.Interfaces.SecureStorage.IBBDFileEntry.ReadAllDataAsync ( )

Reads file in the secure store as byte array.

Exceptions
Exceptions.BBDFileSystemExceptionThrown when the file can not be read.
Returns
Byte array.
Task<string> BBDXamarinForms.Common.Interfaces.SecureStorage.IBBDFileEntry.ReadAllTextAsync ( )

Reads file in the secure store as string.

Exceptions
Exceptions.BBDFileSystemExceptionThrown when the file can not be read.
Returns
UTF-8 result string.
Task<bool> BBDXamarinForms.Common.Interfaces.SecureStorage.IBBDFileEntry.RemoveAsync ( )

Deletes a file.

All further file entry operations are forbidden.

Exceptions
Exceptions.BBDFileSystemExceptionThrown if an error occurs when attempting to delete the file.
Returns
true if the file was successfully deleted; otherwise, false.
Task<IBBDFileEntry> BBDXamarinForms.Common.Interfaces.SecureStorage.IBBDFileEntry.RenameAsync ( string  newName)

Renames a filename.

Rename to the same filename is allowed.

Exceptions
Exceptions.BBDFileSystemExceptionThrown if there is already a file or directory with the same name (except to rename to the same filename).
Parameters
newNameThe new name of the file.
Returns
Newly renamed IBBDFileEntry or this if renamed to the same filename.
Task BBDXamarinForms.Common.Interfaces.SecureStorage.IBBDFileEntry.WriteAllDataAsync ( byte[]  data)

Writes byte array to the single file in the secure store.

Writes to the beginning of the file (will overwrite existing data).

Exceptions
Exceptions.BBDFileSystemExceptionThrown when the file can not be written.
Parameters
dataByte array to write.
Returns
Task.
Task BBDXamarinForms.Common.Interfaces.SecureStorage.IBBDFileEntry.WriteAllTextAsync ( string  contents)

Writes string to the single file in the secure store.

Writes to the beginning of the file (will overwrite existing data).

Exceptions
Exceptions.BBDFileSystemExceptionThrown when the file can not be written.
Parameters
contentsUTF-8 string to write.
Returns
Task.

Property Documentation

string BBDXamarinForms.Common.Interfaces.SecureStorage.IBBDFileEntry.EncryptedFullPath
get

Gets the enrypted full path.

The encrypted absolute full path to the file entry.

IBBDFileSystem BBDXamarinForms.Common.Interfaces.SecureStorage.IBBDFileEntry.FileSystem
get

Gets the BBD secure file system interface. IBBDFileSystem class.

BBD secure file system on which the file entry resides.

string BBDXamarinForms.Common.Interfaces.SecureStorage.IBBDFileEntry.FullPath
get

Gets the full path.

The absolute full path to the file entry.

string BBDXamarinForms.Common.Interfaces.SecureStorage.IBBDFileEntry.Name
get

Gets the file entry name.

Name of the file entry, excluding the path leading to it.