Zsh has no platform security capabilities, that is, it cannot directly access the private directories on a device. However, you can make use of two library functions from the static library (copydatafile.lib
) to copy data between public and private directories:
static TInt CopyDataFile::CopyToPrivateL(TDesC&
aFileName)
: This function copies data from the public directory (c:\shellpub\<SID>
where SID
refers to the Secure ID of the application) to the private directory.
static TInt CopyDataFile::CopyToPublicL(TDesC&
aFileName)
: This function copies data from the private directory to the public directory (c:\shellpub\<SID>
).
These library functions can be linked to External Programs to copy the data under a private directory to and from a public directory, c:\shellpub
. Note that these functions are not part of Zsh; they are in a separate library and it is not mandatory to use them.
Using these library functions, here is one way of copying data, so that it can be accessed with Zsh:
To copy the files from public directory c:\shellpub\<SID>
to \private\<SID>
, call the CopyToPrivateL()
function while you start the application.
As the c:\shellpub
directory is public, you can view or modify files in it from Zsh.
Each application replicates its directory structure under c:\shellpub
starting with <SID>
so that they do not overwrite private files of the same name belonging to other applications.
To copy the files from \private\<SID>
to a public directory c:\shellpub\<SID>
, call the CopyToPublicL()
function while you exit the application.