BlackBerry Dynamics for .NET Maui  12.0.0.9
Runtime library for .NET Maui applications
BBDXamarinForms.Common.Interfaces.SecureStorage.IBBDDirectoryEntry Interface Reference

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

Public Member Functions

Task< IBBDMetadataGetMetadataAsync ()
 Gets state of a directory entry on the BBD secure file system. More...
 
Task< IBBDFileEntryCreateFileAsync (string desiredName)
 Creates an empty file in the secure file system. More...
 
Task< IBBDDirectoryEntryCreateDirectoryAsync (string desiredName)
 Creates a directory in the current directory of secure file system. More...
 
Task< IBBDDirectoryEntryGetDirectoryAsync (string name)
 Gets decrypted directory entry that is in the instance's directory. More...
 
Task< IList< IBBDDirectoryEntry > > GetDirectoriesAsync ()
 Gets list of the decrypted directory entries that are in the instance's directory. More...
 
Task< IBBDFileEntryGetFileAsync (string name)
 Gets decrypted file entry that is in the instance's directory. More...
 
Task< IList< IBBDFileEntry > > GetFilesAsync ()
 Gets list of the decrypted file entries that are in the instance's directory. More...
 
Task< ExistenceCheckResultEnumCheckExistsAsync (string name)
 Checks whether a directory or file exists at the current location. More...
 
Task< bool > RemoveAsync ()
 Deletes a directory. It is an error to attempt to delete a directory that is not empty or the root directory of filesystem. More...
 
Task< bool > RemoveRecursivelyAsync ()
 
Task< IBBDDirectoryEntryGetParentAsync ()
 Looks up the parent IBBDDirectoryEntry of this entry. More...
 
Task< IBBDDirectoryEntryCopyAsync (string destination, string newName="")
 Copies a directory to a different location on the file system. More...
 
Task< IBBDDirectoryEntryMoveAsync (string destination, string newName="")
 Moves a directory to a different location on the file system. More...
 
Task< IBBDDirectoryEntryRenameAsync (string newName)
 Renames a directory. More...
 

Properties

string Name [get]
 Gets the directory 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. IBBDFileSystem class. More...
 

Detailed Description

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

Member Function Documentation

◆ CheckExistsAsync()

Task<ExistenceCheckResultEnum> BBDXamarinForms.Common.Interfaces.SecureStorage.IBBDDirectoryEntry.CheckExistsAsync ( string  name)

Checks whether a directory or file exists at the current location.

Directory separator chars will be trimmed from the beginning and the end of the name.

Directory separator char is forbidden in the middle of the name.

Exceptions
System.ExceptionThrown when error occurs.
Parameters
nameThe name of the file or directory to check for.
Returns
ExistenceCheckResultEnum

NotFound if the file or directory doesn't exist; FileExists if the file exists, FolderExists if directory exists

◆ CopyAsync()

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

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

Directory copy is recursive - copies all contents of the directory.

Exceptions
Exceptions.BBDFileSystemExceptionThrown if there is already a file or directory at the destination.
Parameters
destinationThe directory to which to copy the directory.
newNameThe new name of the directory. Defaults to the current name if unspecified.
Returns
Newly copied IBBDDirectoryEntry.

◆ CreateDirectoryAsync()

Task<IBBDDirectoryEntry> BBDXamarinForms.Common.Interfaces.SecureStorage.IBBDDirectoryEntry.CreateDirectoryAsync ( string  desiredName)

Creates a directory in the current directory of secure file system.

If there is already a file or directory at the instance's path, then this method will fail.

Directory separator chars will be trimmed from the beginning and the end of the desiredName.

Directory separator char is forbidden in the middle of the desiredName.

Exceptions
Exceptions.BBDFileSystemExceptionThrown when directory can not be created.
Parameters
desiredNameName of the directory.
Returns
IBBDDirectoryEntry interface.

◆ CreateFileAsync()

Task<IBBDFileEntry> BBDXamarinForms.Common.Interfaces.SecureStorage.IBBDDirectoryEntry.CreateFileAsync ( string  desiredName)

Creates an empty file in the secure file system.

If there is already a file or directory at the instance's path, then this method will fail.

Directory separator chars will be trimmed from the beginning and the end of the desiredName.

Directory separator char is forbidden in the middle of the desiredName.

Exceptions
Exceptions.BBDFileSystemExceptionThrown when file can not be created.
Parameters
desiredNameName of the file.
Returns
IBBDFileEntry interface.

◆ GetDirectoriesAsync()

Task<IList<IBBDDirectoryEntry> > BBDXamarinForms.Common.Interfaces.SecureStorage.IBBDDirectoryEntry.GetDirectoriesAsync ( )

Gets list of the decrypted directory entries that are in the instance's directory.

Exceptions
System.ExceptionThrown when error occurs.
Returns
List of IBBDDirectoryEntry interfaces.

◆ GetDirectoryAsync()

Task<IBBDDirectoryEntry> BBDXamarinForms.Common.Interfaces.SecureStorage.IBBDDirectoryEntry.GetDirectoryAsync ( string  name)

Gets decrypted directory entry that is in the instance's directory.

Exceptions
Exceptions.BBDFileSystemExceptionThrown when directory does not exist.
Parameters
nameName of the directory.
Returns
IBBDDirectoryEntry interface.

◆ GetFileAsync()

Task<IBBDFileEntry> BBDXamarinForms.Common.Interfaces.SecureStorage.IBBDDirectoryEntry.GetFileAsync ( string  name)

Gets decrypted file entry that is in the instance's directory.

Exceptions
Exceptions.BBDFileSystemExceptionThrown when file does not exist.
Parameters
nameName of the file.
Returns
IBBDFileEntry interface.

◆ GetFilesAsync()

Task<IList<IBBDFileEntry> > BBDXamarinForms.Common.Interfaces.SecureStorage.IBBDDirectoryEntry.GetFilesAsync ( )

Gets list of the decrypted file entries that are in the instance's directory.

Exceptions
System.ExceptionThrown when error occurs.
Returns
List of IBBDFileEntry interfaces.

◆ GetMetadataAsync()

Task<IBBDMetadata> BBDXamarinForms.Common.Interfaces.SecureStorage.IBBDDirectoryEntry.GetMetadataAsync ( )

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

Exceptions
Exceptions.BBDFileSystemExceptionThrown when error occurs.
Returns
IBBDMetadata interface.

◆ GetParentAsync()

Task<IBBDDirectoryEntry> BBDXamarinForms.Common.Interfaces.SecureStorage.IBBDDirectoryEntry.GetParentAsync ( )

Looks up the parent IBBDDirectoryEntry of this entry.

Exceptions
Exceptions.BBDFileSystemExceptionThrown if an error occurs when attempting to get the parent.
Returns
IBBDDirectoryEntry or null if looks up for root's parent

◆ MoveAsync()

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

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

Directory move is recursive - moves all contents of the directory.

Exceptions
Exceptions.BBDFileSystemExceptionThrown if there is already a file or directory at the destination (except to move to the same directory name).
Parameters
destinationThe directory to which to move the directory.
newNameThe new name of the directory. Defaults to the current name if unspecified.
Returns
Newly moved IBBDDirectoryEntry or this if moved to the same location without name changing.

◆ RemoveAsync()

Task<bool> BBDXamarinForms.Common.Interfaces.SecureStorage.IBBDDirectoryEntry.RemoveAsync ( )

Deletes a directory. It is an error to attempt to delete a directory that is not empty or the root directory of filesystem.

Exceptions
Exceptions.BBDFileSystemExceptionThrown when directory is not empty or is the root directory of filesystem.
Returns
true if the directory was successfully deleted; otherwise, false.

◆ RemoveRecursivelyAsync()

Task<bool> BBDXamarinForms.Common.Interfaces.SecureStorage.IBBDDirectoryEntry.RemoveRecursivelyAsync ( )

Deletes a directory and all of its contents.

In the event of an error (e.g. trying to delete a directory that contains a file that cannot be removed), some of the contents of the directory may be deleted.

It is an error to attempt to delete the root directory of a filesystem.

Exceptions
Exceptions.BBDFileSystemExceptionThrown when directory is the root directory of filesystem.
Returns
true if the directory was successfully deleted; otherwise, false.

◆ RenameAsync()

Task<IBBDDirectoryEntry> BBDXamarinForms.Common.Interfaces.SecureStorage.IBBDDirectoryEntry.RenameAsync ( string  newName)

Renames a directory.

Rename to the same name is allowed.

Exceptions
Exceptions.BBDFileSystemExceptionThrown if there is already a file or directory with the same name (except to rename to the same name) or if the current directory is the root directory of the filesystem.
Parameters
newNameThe new name of the directory.
Returns
Newly renamed IBBDDirectoryEntry or this if renamed to the same directory name.

Property Documentation

◆ EncryptedFullPath

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

Gets the enrypted full path.

The encrypted absolute full path to the directory entry.

◆ FileSystem

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

Gets the BBD secure file system. IBBDFileSystem class.

BBD secure file system on which the directory entry resides.

◆ FullPath

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

Gets the full path.

The absolute full path to the directory entry.

◆ Name

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

Gets the directory entry name.

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