How do I change the default storage path of dexie data - dexie

How do I change the default storage path of dexie data, which is now stored in the user directory of windows, I want to customize the stored path

Related

Where to save application data in windows?

I am trying to make a windows application. In this application, some files get modified as a user add or delete an entry. I saved these files on the application folder itself.
But After making binary file I installed it, As I try to add a entry it get crashed.
So, I figured out the issue. The windows doesn't allow to modified files inside C:\Program Files.
So, I installed it in other drive and it works. It solved my issue temporarily but I want to know how other application works in windows.
Where do those applications save their data?
I am not talking about some data which get saved in "Documents" but something which is essential need to modified every time user makes change like theme, formates.
No user access is allowed to the "program folder", and that's for good: it is a system folder, and it should only be accessed for system related operations (like installing or uninstalling a program).
There are many places where "program data" can be stored depending on the situation, and QStandardPaths provides access to their paths, according to the category location. What you might be interested in are:
ConfigLocation: Returns a directory location where user-specific configuration files should be written. This may be either a generic value or application-specific, and the returned path is never empty.
AppDataLocation: Returns a directory location where persistent application data can be stored. This is an application-specific directory.
AppLocalDataLocation: As the previous one, but Windows specific.
AppConfigLocation: Returns a directory location where user-specific configuration files should be written. This is an application-specific directory, and the returned path is never empty.
Those paths (along with the others listed in the documentation) can be accessed using the following static methods:
standardLocations(locationType): returns a list of paths for the requested location type, in order of priority (the first is usually the preferred one);
writableLocation(locationType): returns the preferred path for which write access is allowed (usually the first of the standardLocations());
If you need to store the user configuration, you can use QStandardPaths.writableLocation(AppConfigLocation), while if you have some user-specific internal data that is used by the application (email database, document templates, etc) QStandardPaths.writableLocation(AppLocalDataLocation) should be a good choice.
In both cases, those paths may not exist, so you need to ensure that and eventually create them, possibly by using QDir(path):
dataPath = QtCore.QStandardPaths.writableLocation(AppLocalDataLocation)
dataPathDir = QtCore.QDir(dataPath)
if not dataPathDir.exists():
# create the directory (including parent directories if they don't exist);
# that the argument of mkpath is relative to the QDir's object path, so
# using '.' means that it will create the actual dataPath
dataPathDir.mkpath('.')
Note that for all of the above (especially the last 3) it's required that you correctly set both the organizationName and the applicationName.

How do I save to RFC 5785 (The folder .well-known) in Azure Blob?

I need to save the Apple-Site-Association file to the .well-known top level directory in Azure Blob Storage.
How can I save a file to this url?
I need to save the Apple-Site-Association file to the .well-known top level directory in Azure Blob Storage.
The base URI of a blob includes the name of the account, the name of the container, and the name of the blob:
https://{storageaccount}.blob.core.windows.net/{containername}/{blobname}
If you specify container name with “.well-known”, which violate naming rules, because container names must start with a letter or number.

Couchbase lite data storing path

I am using couchbase lite for my Windows application, I want to know the place where Document created by code are going to be stored.
As of 2018 you can specify the location of a database when you connect to it.
According to the docs:
The DatabaseConfiguration.Database property Gets or sets the directory to use when creating or opening the data.
So when you create the Database object, the constructor
"Creates a database with a given name and database configuration. If the configuration is null then the default configuration will be used. If the database does not yet exist, it will be created."
var database = new Database("mydb", new DatabaseConfiguration(){Database="mylocation/dbname"});
This is rough code but you get the idea.
If you do not specify a directory path when you create a db then it goes in a default directory in your local user space, for Windows this is explained in this SO page
The location is determined by the JavaContext you pass when you create a new Manager object.
The default is a subdirectory named "cblite", or you can pass a String arg when you create the JavaContext instance.
If the path you supply is not absolute, the location is relative to the working directory of the application.

How i locate itunes media folder location using com.itunes.plist

I need to access the media folder location of itunes thats set in iTunes-Prferencces-Advanced through com.itunes.plist.
Please help me
Thanks
The location of the media folder is stored under the key "alis:11345:Music Folder Location". The value stored under that key is a data blob containing the contents of an AliasHandle. For a Cocoa wrapper to deal with alias data, take a look at the open source BDAlias class. That will let you create an alias from the data blob, and then resolve the alias to find the underlying path to which it refers.

Resolving AliasRecord with relative path on a new volume

I have an AliasRecord creating using the Alias Manager function FSNewAlias(fromFSRef, targetFSRef, &aliasRecordHandle). My understanding is that the resulting alias record will contain information for a relative path search (relative to fromFSRef). Because my users are on networked home directories and mobile accounts, these aliases do not appear to persist the location of a file in the user's home directory between the networked and mobile home directories because they are on different volumes. If the original fromFSRef corresponded to /Network/.../Users/user/Desktop in the network account, I would like to be able to resolve the alias using FSResolveAlias(newFromFSRef, aliasRecordHandle, &targetFSRef, &changed) with newFSRef corresponding to /Users/user/Desktop (i.e. the mobile account). Is this possible?
The solution I've resorted to is to persist the alias record and the relative path. I use the relative path to create a new alias if alias resolution fails.
It appears that the solution proposed in the question—persisting both the alias record and a relative path is the only option. If alias resolution fails, we try using the relative path (along with an application or user-defined root) to find the file. If this succeeds, we update the alias record with the new path. Otherwise, we fall back to asking the user to find the "lost" file.

Resources