On Friday 27 July 2007 10:29, opensuse@sky-bizz.com wrote:
Hello
[at first: i am not new to developing software, but i am slightly new to developing linux-software :)]
i'm just developing an command line tool for linux (c++), which has to save its data into a single file in the filesystem, undependently from running user. its handling is best described like or compared with "updatedb". there is only one data-file for all users.
in which folder should i create the application's data-file, and whats about the needed rights on it? can this application "ask" for getting needed privileges like on windows?
Your application should be written to use a directory structure of its own referenced only by relative path names combined with a configuration-time or installation-time base directory. It should not assume or have hard coded this base directory. Configuring the application prior to compiling or installing it should supply that base directory. So a complex application might use a directory structure like this: bin/ config/ data/ doc/ In this setup, bin/ would hold the executables and scripts used to launch, configure or maintain the application or subsets of its functionality. Local configuration for the application as a whole would go in config/. Obviously, doc/ would hold documentation files, either those used directly by the application for integrated / on-line help and documentation or for access by end users (maybe a PDF file or something as simple as a READ-ME file). Lastly, data/ would hold the application's pre-supplied or, possibly, locally acquired data. However, in the latter case, creating a directory in /var would probably be better, especially if that data is voluminous. Such a data directory should probably be separately configurable form the installation base directory. In any given build or installation, this cluster of directories might end up in /usr/local/my-app, /usr/local/share/my-app, /opt/my-app or somewhere else.
is there a special folder intended for handling such things? if yes, what folder?
kind regards for any help hagen
Randall Schulz --------------------------------------------------------------------- To unsubscribe, e-mail: opensuse-programming+unsubscribe@opensuse.org For additional commands, e-mail: opensuse-programming+help@opensuse.org