In my application I plan to store files locally ( exported files ) and import files which user copy via USB to the disk. Where to locate such application files ? Is there some recomendation ?

share|improve this question
    
I am not sure what your goal is. You'd like to set an application specific location for files? (Automatically?) copy specific files from usb to that location? You you give a bit more context? – Jacob Vlijm Mar 29 '15 at 15:48
up vote 1 down vote accepted

If your application is designed to run under application confinement (usually required if you plan to ship through the click store), it will be restricted to access files only within its own silo. Files you wish to store permanently should be stored in .local/share/<appid>. <appid> is the unique string identifying your application, showing up as the applicationName in your MainView (if you're using QML) and the "Package path" in the click store. (Why yes, let's give this thing a few different names!)

If you're not worried about these restrictions, you can place the files anywhere. If these are files which the user shouldn't have to worry about, you should follow the XDG Base Directory Specification. (Brief summary: configuration files in ~/.config/, data files in ~/.local/share/.) If these are files that the user may want to access directly, I feel you ought to let the user choose where they get stored.

share|improve this answer

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.