Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > comp.lang.c > #163832

Re: Unix-y way to store records/structures within filesystem in C

From songbird <songbird@anthive.com>
Newsgroups comp.lang.c
Subject Re: Unix-y way to store records/structures within filesystem in C
Date 2021-12-14 09:58 -0500
Organization the little wild kingdom
Message-ID <81om8i-932.ln1@anthive.com> (permalink)
References <281cf765-1771-4549-9baf-9e2b8b886bb7n@googlegroups.com>

Show all headers | View raw


Bithov Vinu Student wrote:
...
> Ideally my program would run on a per-user basis, ie. in the home directory of a given user:
>
> ~/.cards/<WHERE THE CARDS ARE STORED>
...

  in recent years the attempt to get away from the multiple dot 
files under a users home directory of many linux distributions is 
to use ~/.config/<program-name>/ as the place to store configuration
files and  ~/.local/share/<program-name>/ as the place to store
program data.

  note, that making sure the directory doesn't already exist is
important because if the user has already installed another 
program with the same name then you don't want to clobber or
corrupt their previous work.  card is a very generic name and
you may want to use something a bit more complicated to avoid
some chance of easy name collision.

  if you intend this program to work for Macs or other systems
then the file system layout is different for those.


  songbird

Back to comp.lang.c | Previous | NextPrevious in thread | Find similar | Unroll thread


Thread

Unix-y way to store records/structures within filesystem in C Bithov Vinu Student <vinub@calday.co.uk> - 2021-12-12 23:45 -0800
  Re: Unix-y way to store records/structures within filesystem in C Lew Pitcher <lew.pitcher@digitalfreehold.ca> - 2021-12-13 16:14 +0000
  Re: Unix-y way to store records/structures within filesystem in C songbird <songbird@anthive.com> - 2021-12-14 09:58 -0500

csiph-web