Style fixes to FindDirectory
This commit is contained in:
parent
f27f868283
commit
dd1281c99b
|
@ -1,13 +1,14 @@
|
||||||
/*
|
/*
|
||||||
* Copyright 2011 Haiku Inc. All rights reserved.
|
* Copyright 2011-2013 Haiku Inc. All rights reserved.
|
||||||
* Distributed under the terms of the MIT License.
|
* Distributed under the terms of the MIT License.
|
||||||
*
|
*
|
||||||
* Documentation by:
|
* Documentation by:
|
||||||
* Adrien Destugues, pulkomandy@pulkomandy.ath.cx
|
* Adrien Destugues, pulkomandy@pulkomandy.ath.cx
|
||||||
|
* John Scipione, jscipione@gmail.com
|
||||||
*
|
*
|
||||||
* Corresponds to:
|
* Corresponds to:
|
||||||
* headers/os/storage/FindDirectory.h rev 42600
|
* headers/os/storage/FindDirectory.h hrev46316
|
||||||
* src/kits/storage/FindDirectory.cpp rev 42600
|
* src/kits/storage/FindDirectory.cpp hrev46316
|
||||||
*/
|
*/
|
||||||
|
|
||||||
|
|
||||||
|
@ -23,7 +24,7 @@
|
||||||
versions of Haiku, and already changed in past ones. Using this function
|
versions of Haiku, and already changed in past ones. Using this function
|
||||||
makes your application more future-proof, and makes sure everyone puts data
|
makes your application more future-proof, and makes sure everyone puts data
|
||||||
in the same place, which makes the system cleaner and easier to manage.
|
in the same place, which makes the system cleaner and easier to manage.
|
||||||
|
|
||||||
Note this function can be accessed from C code, to make it easy to use also
|
Note this function can be accessed from C code, to make it easy to use also
|
||||||
in ported applications.
|
in ported applications.
|
||||||
*/
|
*/
|
||||||
|
@ -32,7 +33,7 @@
|
||||||
/*!
|
/*!
|
||||||
\enum directory_which
|
\enum directory_which
|
||||||
\brief Directory constants to use with find_directory.
|
\brief Directory constants to use with find_directory.
|
||||||
|
|
||||||
There are four kind of directories. Volume-local directories exist on each
|
There are four kind of directories. Volume-local directories exist on each
|
||||||
volume. They may be at a different place in each of them, for example the
|
volume. They may be at a different place in each of them, for example the
|
||||||
trash location depends on the filesystem. System and common directories are
|
trash location depends on the filesystem. System and common directories are
|
||||||
|
@ -42,8 +43,8 @@
|
||||||
ignored when the user disable user add-ons in the boot menu. User
|
ignored when the user disable user add-ons in the boot menu. User
|
||||||
directories have a different value depending on the UID of the application
|
directories have a different value depending on the UID of the application
|
||||||
calling the function. They are usually located in the user home directory.
|
calling the function. They are usually located in the user home directory.
|
||||||
|
|
||||||
Use common directories for system-wide filessuch as drivers. Use user
|
Use common directories for system-wide files such as drivers. Use user
|
||||||
directories for application settings, since each user may want different
|
directories for application settings, since each user may want different
|
||||||
settings.
|
settings.
|
||||||
*/
|
*/
|
||||||
|
@ -52,58 +53,58 @@
|
||||||
/*!
|
/*!
|
||||||
\var directory_which B_DESKTOP_DIRECTORY
|
\var directory_which B_DESKTOP_DIRECTORY
|
||||||
The desktop for a given volume.
|
The desktop for a given volume.
|
||||||
|
|
||||||
\var directory_which B_TRASH_DIRECTORY
|
\var directory_which B_TRASH_DIRECTORY
|
||||||
The trash for a given volume.
|
The trash for a given volume.
|
||||||
|
|
||||||
\var directory_which B_SYSTEM_DIRECTORY
|
\var directory_which B_SYSTEM_DIRECTORY
|
||||||
The system directory.
|
The system directory.
|
||||||
|
|
||||||
\var directory_which B_SYSTEM_ADDONS_DIRECTORY
|
\var directory_which B_SYSTEM_ADDONS_DIRECTORY
|
||||||
The system add-ons directory
|
The system add-ons directory
|
||||||
|
|
||||||
\var directory_which B_SYSTEM_BOOT_DIRECTORY
|
\var directory_which B_SYSTEM_BOOT_DIRECTORY
|
||||||
The system boot directory. Contains the minimal set of files required for
|
The system boot directory. Contains the minimal set of files required for
|
||||||
booting Haiku.
|
booting Haiku.
|
||||||
|
|
||||||
\var directory_which B_SYSTEM_FONTS_DIRECTORY
|
\var directory_which B_SYSTEM_FONTS_DIRECTORY
|
||||||
The system fonts directory
|
The system fonts directory
|
||||||
|
|
||||||
\var directory_which B_SYSTEM_LIB_DIRECTORY
|
\var directory_which B_SYSTEM_LIB_DIRECTORY
|
||||||
The system lib directory.
|
The system lib directory.
|
||||||
|
|
||||||
\var directory_which B_SYSTEM_SERVERS_DIRECTORY
|
\var directory_which B_SYSTEM_SERVERS_DIRECTORY
|
||||||
The system servers directory.
|
The system servers directory.
|
||||||
|
|
||||||
\var directory_which B_SYSTEM_APPS_DIRECTORY
|
\var directory_which B_SYSTEM_APPS_DIRECTORY
|
||||||
The system applications direcotry. Contains applications executable from
|
The system applications directory. Contains applications executable from
|
||||||
Tracker.
|
Tracker.
|
||||||
|
|
||||||
\var directory_which B_SYSTEM_BIN_DIRECTORY
|
\var directory_which B_SYSTEM_BIN_DIRECTORY
|
||||||
The system bin directory. Contains command-line applications runnable from
|
The system bin directory. Contains command-line applications runnable from
|
||||||
Terminal.
|
Terminal.
|
||||||
|
|
||||||
\var directory_which B_SYSTEM_DOCUMENTATION_DIRECTORY
|
\var directory_which B_SYSTEM_DOCUMENTATION_DIRECTORY
|
||||||
The system documentation directory. Contains manpages.
|
The system documentation directory. Contains manpages.
|
||||||
|
|
||||||
\var directory_which B_SYSTEM_PREFERENCES_DIRECTORY
|
\var directory_which B_SYSTEM_PREFERENCES_DIRECTORY
|
||||||
The system preferences directory.
|
The system preferences directory.
|
||||||
|
|
||||||
\var directory_which B_SYSTEM_TRANSLATORS_DIRECTORY
|
\var directory_which B_SYSTEM_TRANSLATORS_DIRECTORY
|
||||||
The system translator directory.
|
The system translator directory.
|
||||||
|
|
||||||
\var directory_which B_SYSTEM_MEDIA_NODES_DIRECTORY
|
\var directory_which B_SYSTEM_MEDIA_NODES_DIRECTORY
|
||||||
The system media nodes directory.
|
The system media nodes directory.
|
||||||
|
|
||||||
\var directory_which B_SYSTEM_SOUNDS_DIRECTORY
|
\var directory_which B_SYSTEM_SOUNDS_DIRECTORY
|
||||||
The system sounds directory.
|
The system sounds directory.
|
||||||
|
|
||||||
\var directory_which B_SYSTEM_DATA_DIRECTORY
|
\var directory_which B_SYSTEM_DATA_DIRECTORY
|
||||||
The system data directory.
|
The system data directory.
|
||||||
|
|
||||||
\var directory_which B_COMMON_DIRECTORY
|
\var directory_which B_COMMON_DIRECTORY
|
||||||
The common directory.
|
The common directory.
|
||||||
|
|
||||||
\var directory_which B_COMMON_SYSTEM_DIRECTORY
|
\var directory_which B_COMMON_SYSTEM_DIRECTORY
|
||||||
\var directory_which B_COMMON_ADDONS_DIRECTORY
|
\var directory_which B_COMMON_ADDONS_DIRECTORY
|
||||||
\var directory_which B_COMMON_BOOT_DIRECTORY
|
\var directory_which B_COMMON_BOOT_DIRECTORY
|
||||||
|
@ -117,10 +118,10 @@
|
||||||
\var directory_which B_COMMON_DEVELOP_DIRECTORY
|
\var directory_which B_COMMON_DEVELOP_DIRECTORY
|
||||||
The common development directory. Contains toolchains, include files,
|
The common development directory. Contains toolchains, include files,
|
||||||
and other tools related to application development.
|
and other tools related to application development.
|
||||||
|
|
||||||
\var directory_which B_COMMON_LOG_DIRECTORY
|
\var directory_which B_COMMON_LOG_DIRECTORY
|
||||||
The common log directory. Log files are stored here.
|
The common log directory. Log files are stored here.
|
||||||
|
|
||||||
\var directory_which B_COMMON_SPOOL_DIRECTORY
|
\var directory_which B_COMMON_SPOOL_DIRECTORY
|
||||||
\var directory_which B_COMMON_TEMP_DIRECTORY
|
\var directory_which B_COMMON_TEMP_DIRECTORY
|
||||||
\var directory_which B_COMMON_VAR_DIRECTORY
|
\var directory_which B_COMMON_VAR_DIRECTORY
|
||||||
|
@ -130,7 +131,7 @@
|
||||||
\var directory_which B_COMMON_DATA_DIRECTORY
|
\var directory_which B_COMMON_DATA_DIRECTORY
|
||||||
The common data directory. You may store application data here, such as
|
The common data directory. You may store application data here, such as
|
||||||
resources (graphics, music) for your application.
|
resources (graphics, music) for your application.
|
||||||
|
|
||||||
\var directory_which B_COMMON_CACHE_DIRECTORY
|
\var directory_which B_COMMON_CACHE_DIRECTORY
|
||||||
The common cache directory. You may store temporary data here, such as
|
The common cache directory. You may store temporary data here, such as
|
||||||
thumbnails for a picture viewer application, or a web browser data cache.
|
thumbnails for a picture viewer application, or a web browser data cache.
|
||||||
|
@ -138,7 +139,7 @@
|
||||||
\var directory_which B_USER_DIRECTORY
|
\var directory_which B_USER_DIRECTORY
|
||||||
The user home directory. Do NOT store application settings here as on unix,
|
The user home directory. Do NOT store application settings here as on unix,
|
||||||
instead use B_USER_SETTINGS_DIRECTORY.
|
instead use B_USER_SETTINGS_DIRECTORY.
|
||||||
|
|
||||||
\var directory_which B_USER_CONFIG_DIRECTORY
|
\var directory_which B_USER_CONFIG_DIRECTORY
|
||||||
\var directory_which B_USER_ADDONS_DIRECTORY
|
\var directory_which B_USER_ADDONS_DIRECTORY
|
||||||
\var directory_which B_USER_BOOT_DIRECTORY
|
\var directory_which B_USER_BOOT_DIRECTORY
|
||||||
|
@ -149,11 +150,11 @@
|
||||||
Create a subdirectory for your application if you have multiple files to
|
Create a subdirectory for your application if you have multiple files to
|
||||||
store, else, put a single file. The file or directory should have the same
|
store, else, put a single file. The file or directory should have the same
|
||||||
name as your application, so the user knows what it's used for.
|
name as your application, so the user knows what it's used for.
|
||||||
|
|
||||||
\var directory_which B_USER_DESKBAR_DIRECTORY
|
\var directory_which B_USER_DESKBAR_DIRECTORY
|
||||||
The user deskbar directory. You may add a link to your application here, so
|
The user deskbar directory. You may add a link to your application here, so
|
||||||
it shows up in the user deskbar's leaf menu.
|
it shows up in the user deskbar's leaf menu.
|
||||||
|
|
||||||
\var directory_which B_USER_PRINTERS_DIRECTORY
|
\var directory_which B_USER_PRINTERS_DIRECTORY
|
||||||
\var directory_which B_USER_TRANSLATORS_DIRECTORY
|
\var directory_which B_USER_TRANSLATORS_DIRECTORY
|
||||||
\var directory_which B_USER_MEDIA_NODES_DIRECTORY
|
\var directory_which B_USER_MEDIA_NODES_DIRECTORY
|
||||||
|
@ -168,18 +169,20 @@
|
||||||
|
|
||||||
|
|
||||||
/*!
|
/*!
|
||||||
\fn status_t find_directory(directory_which which, dev_t volume, bool createIt, char* pathString, int32 length)
|
\fn status_t find_directory(directory_which which, dev_t volume,
|
||||||
|
bool createIt, char* pathString, int32 length)
|
||||||
\brief C interface to find_directory
|
\brief C interface to find_directory
|
||||||
|
|
||||||
Fills up to \a length characters of \a pathString with the path to \a which
|
Fills up to \a length characters of \a pathString with the path to \a which
|
||||||
on \a volume. Creates the directory if it doesn't exists and \a creqteIt is
|
on \a volume. Creates the directory if it doesn't exists if \a createIt is
|
||||||
set.
|
set.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
|
|
||||||
/*!
|
/*!
|
||||||
\fn status_t find_directory(directory_which which, BPath* path, bool createIt = false, BVolume* volume = NULL)
|
\fn status_t find_directory(directory_which which, BPath* path, bool createIt,
|
||||||
|
BVolume* volume)
|
||||||
\brief C++ interface to find_directory
|
\brief C++ interface to find_directory
|
||||||
|
|
||||||
Set \a path to \a which on \a volume.
|
Set \a path to \a which on \a volume.
|
||||||
*/
|
*/
|
||||||
|
|
Loading…
Reference in New Issue