Data Structures | Typedefs | Functions
Efreet_Base: The XDG Base Directory Specification

functions More...

Data Structures

struct  _Efreet_Event_Cache_Update
 Efreet_Event_Cache_Update. More...
 

Typedefs

typedef struct _Efreet_Event_Cache_Update Efreet_Event_Cache_Update
 Efreet_Event_Cache_Update.
 

Functions

const char * efreet_data_home_get (void)
 Retrieves the XDG Data Home directory. More...
 
Eina_Listefreet_data_dirs_get (void)
 Returns the Eina_List of preference ordered extra data directories. More...
 
const char * efreet_config_home_get (void)
 Retrieves the XDG Config Home directory. More...
 
const char * efreet_desktop_dir_get (void)
 Retrieves the XDG Desktop directory. More...
 
const char * efreet_download_dir_get (void)
 Retrieves the XDG Download directory. More...
 
const char * efreet_templates_dir_get (void)
 Retrieves the XDG Templates directory. More...
 
const char * efreet_public_share_dir_get (void)
 Retrieves the XDG Public Share directory. More...
 
const char * efreet_documents_dir_get (void)
 Retrieves the XDG Documents directory. More...
 
const char * efreet_music_dir_get (void)
 Retrieves the XDG Music directory. More...
 
const char * efreet_pictures_dir_get (void)
 Retrieves the XDG Pictures directory. More...
 
const char * efreet_videos_dir_get (void)
 Retrieves the XDG Videos directory. More...
 
Eina_Listefreet_config_dirs_get (void)
 Returns the Eina_List of preference ordered extra config directories. More...
 
const char * efreet_cache_home_get (void)
 Retrieves the XDG Cache Home directory. More...
 
const char * efreet_runtime_dir_get (void)
 Retrieves the XDG User Runtime directory. More...
 
const char * efreet_hostname_get (void)
 Returns the current hostname or empty string if not found. More...
 

Detailed Description

functions

See also
http://standards.freedesktop.org/basedir-spec/basedir-spec-latest.html
http://0pointer.de/blog/projects/tmp.html

Function Documentation

◆ efreet_data_home_get()

const char* efreet_data_home_get ( void  )

Retrieves the XDG Data Home directory.

Returns
Returns the XDG Data Home directory This is where user-specific data files should be written ($XDG_DATA_HOME or $HOME/.local/share).

Referenced by efreet_icon_user_dir_get().

◆ efreet_data_dirs_get()

Eina_List* efreet_data_dirs_get ( void  )

Returns the Eina_List of preference ordered extra data directories.

Returns
Returns the Eina_List of preference ordered extra data directories Ordered base directories relative to which data files should be searched ($XDG_DATA_DIRS or /usr/local/share/:/usr/share/)
Note
The returned list is static inside Efreet. If you add/remove from the list then the next call to efreet_data_dirs_get() will return your modified values. DO NOT free this list.

◆ efreet_config_home_get()

const char* efreet_config_home_get ( void  )

Retrieves the XDG Config Home directory.

Returns
Returns the XDG Config Home directory This is where user-specific configuration files should be written ($XDG_CONFIG_HOME or $HOME/.config).

Referenced by efreet_util_menus_find().

◆ efreet_desktop_dir_get()

const char* efreet_desktop_dir_get ( void  )

Retrieves the XDG Desktop directory.

Returns
Returns the XDG Desktop directory This is where user-specific desktop files should be located. It's localized (translated) to current user locale (~/.config/user-dirs.locale and ~/.config/user-dirs.dirs).
Since
1.3

◆ efreet_download_dir_get()

const char* efreet_download_dir_get ( void  )

Retrieves the XDG Download directory.

Returns
Returns the XDG Download directory This is where user-specific download files should be located. It's localized (translated) to current user locale (~/.config/user-dirs.locale and ~/.config/user-dirs.dirs).

It's meant for large download or in-progress downloads, it's private for the user but may be shared among different machines. It's not automatically cleaned up.

See also
efreet_cache_home_get()
efreet_runtime_dir_get()
http://0pointer.de/blog/projects/tmp.html
Since
1.8

◆ efreet_templates_dir_get()

const char* efreet_templates_dir_get ( void  )

Retrieves the XDG Templates directory.

Returns
Returns the XDG Templates directory This is where user-specific template files should be located. It's localized (translated) to current user locale (~/.config/user-dirs.locale and ~/.config/user-dirs.dirs).
See also
efreet_documents_dir_get()
efreet_music_dir_get()
efreet_pictures_dir_get()
efreet_videos_dir_get()
Since
1.8

◆ efreet_public_share_dir_get()

const char* efreet_public_share_dir_get ( void  )

Retrieves the XDG Public Share directory.

Returns
Returns the XDG Public Share directory This is where user-specific public shareable files should be located. It's localized (translated) to current user locale (~/.config/user-dirs.locale and ~/.config/user-dirs.dirs).

Usually local file servers should look here (Apache, Samba, FTP).

Since
1.8

◆ efreet_documents_dir_get()

const char* efreet_documents_dir_get ( void  )

Retrieves the XDG Documents directory.

Returns
Returns the XDG Documents directory This is where user-specific documents files should be located. It's localized (translated) to current user locale (~/.config/user-dirs.locale and ~/.config/user-dirs.dirs).
See also
efreet_templates_dir_get()
efreet_music_dir_get()
efreet_pictures_dir_get()
efreet_videos_dir_get()
Since
1.8

◆ efreet_music_dir_get()

const char* efreet_music_dir_get ( void  )

Retrieves the XDG Music directory.

Returns
Returns the XDG Music directory This is where user-specific music files should be located. It's localized (translated) to current user locale (~/.config/user-dirs.locale and ~/.config/user-dirs.dirs).
See also
efreet_templates_dir_get()
efreet_download_dir_get()
efreet_pictures_dir_get()
efreet_videos_dir_get()
Since
1.8

◆ efreet_pictures_dir_get()

const char* efreet_pictures_dir_get ( void  )

Retrieves the XDG Pictures directory.

Returns
Returns the XDG Pictures directory This is where user-specific pictures files should be located. It's localized (translated) to current user locale (~/.config/user-dirs.locale and ~/.config/user-dirs.dirs).
See also
efreet_templates_dir_get()
efreet_documents_dir_get()
efreet_music_dir_get()
efreet_videos_dir_get()
Since
1.8

◆ efreet_videos_dir_get()

const char* efreet_videos_dir_get ( void  )

Retrieves the XDG Videos directory.

Returns
Returns the XDG Videos directory This is where user-specific video files should be located. It's localized (translated) to current user locale (~/.config/user-dirs.locale and ~/.config/user-dirs.dirs).
See also
efreet_templates_dir_get()
efreet_documents_dir_get()
efreet_music_dir_get()
efreet_pictures_dir_get()
Since
1.8

◆ efreet_config_dirs_get()

Eina_List* efreet_config_dirs_get ( void  )

Returns the Eina_List of preference ordered extra config directories.

Returns
Returns the Eina_List of preference ordered extra config directories Ordered base directories relative to which configuration files should be searched ($XDG_CONFIG_DIRS or /etc/xdg)
Note
The returned list is static inside Efreet. If you add/remove from the list then the next call to efreet_config_dirs_get() will return your modified values. DO NOT free this list.

Referenced by efreet_util_menus_find().

◆ efreet_cache_home_get()

const char* efreet_cache_home_get ( void  )

Retrieves the XDG Cache Home directory.

Returns
Returns the XDG Cache Home directory This is the base directory relative to which user specific non-essential data files should be stored ($XDG_CACHE_HOME or $HOME/.cache).
See also
efreet_runtime_dir_get()
efreet_download_dir_get()
efreet_config_home_get()

◆ efreet_runtime_dir_get()

const char* efreet_runtime_dir_get ( void  )

Retrieves the XDG User Runtime directory.

Returns
Returns the XDG User Runtime directory. This is the base directory relative to which user-specific non-essential runtime files and other file objects (such as sockets, named pipes, ...) should be stored. The directory must be owned by the user, and he must be the only one having read and write access to it. Its Unix access mode must be 0700.

The lifetime of this directory must be bound to the user being logged in. It must be created when the user first logs in and if the user fully logs out the directory must be removed. If the user logs in more than once he should get pointed to the same directory, and it is mandatory that the directory continues to exist from his first login to his last logout on the system, and not removed in between. Files in the directory must not survive reboot or a full logout/login cycle.

The directory must be on a local file system and not shared with any other system. The directory must by fully-featured by the standards of the operating system. More specifically, on Unix-like operating systems AF_UNIX sockets, symbolic links, hard links, proper permissions, file locking, sparse files, memory mapping, file change notifications, a reliable hard link count must be supported, and no restrictions on the file name character set should be imposed. Files in this directory may be subjected to periodic clean-up. To ensure that your files are not removed, they should have their access time timestamp modified at least once every 6 hours of monotonic time or the 'sticky' bit should be set on the file.

If NULL applications should fall back to a replacement directory with similar capabilities and print a warning message. Applications should use this directory for communication and synchronization purposes and should not place larger files in it, since it might reside in runtime memory and cannot necessarily be swapped out to disk.

Note
this directory is similar to /run and is often created in tmpfs (memory-only/RAM filesystem). It is created, managed and cleaned automatically by systemd.
Since
1.8

◆ efreet_hostname_get()

const char* efreet_hostname_get ( void  )

Returns the current hostname or empty string if not found.

Returns
Returns the current hostname