CernVM-FS  2.9.0
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Pages
libcvmfs.h File Reference
#include <stdint.h>
#include <sys/stat.h>
#include <unistd.h>
Include dependency graph for libcvmfs.h:
This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Classes

struct  cvmfs_nc_attr
 
struct  cvmfs_attr
 
struct  cvmfs_stat_t
 

Macros

#define LIBCVMFS_VERSION   2
 
#define LIBCVMFS_VERSION_MAJOR   LIBCVMFS_VERSION
 
#define LIBCVMFS_VERSION_MINOR   9
 
#define LIBCVMFS_REVISION   30
 
#define LIBCVMFS_FAIL_OK   0
 
#define LIBCVMFS_FAIL_NOFILES   -1
 
#define LIBCVMFS_FAIL_MKCACHE   -2
 
#define LIBCVMFS_FAIL_OPENCACHE   -3
 
#define LIBCVMFS_FAIL_LOCKFILE   -4
 
#define LIBCVMFS_FAIL_INITCACHE   -5
 
#define LIBCVMFS_FAIL_INITQUOTA   -6
 
#define LIBCVMFS_FAIL_BADOPT   -7
 

Typedefs

typedef struct LibContext cvmfs_context
 
typedef struct OptionsManager cvmfs_option_map
 

Enumerations

enum  cvmfs_errors {
  LIBCVMFS_ERR_OK = 0, LIBCVMFS_ERR_UNKNOWN, LIBCVMFS_ERR_OPTIONS, LIBCVMFS_ERR_PERMISSION,
  LIBCVMFS_ERR_MOUNT, LIBCVMFS_ERR_LOADER_TALK, LIBCVMFS_ERR_FUSE_LOOP, LIBCVMFS_ERR_LOAD_LIBRARY,
  LIBCVMFS_ERR_INCOMPATIBLE_VERSIONS, LIBCVMFS_ERR_CACHE_DIR, LIBCVMFS_ERR_PEERS, LIBCVMFS_ERR_NFS_MAPS,
  LIBCVMFS_ERR_QUOTA, LIBCVMFS_ERR_MONITOR, LIBCVMFS_ERR_TALK, LIBCVMFS_ERR_SIGNATURE,
  LIBCVMFS_ERR_CATALOG, LIBCVMFS_ERR_MAINTENANCE_MODE, LIBCVMFS_ERR_SAVE_STATE, LIBCVMFS_ERR_RESTORE_STATE,
  LIBCVMFS_ERR_OTHER_MOUNT, LIBCVMFS_ERR_DOUBLE_MOUNT, LIBCVMFS_ERR_HISTORY, LIBCVMFS_ERR_WPAD,
  LIBCVMFS_ERR_LOCK_WORKSPACE, LIBCVMFS_ERR_REVISION_BLACKLISTED
}
 

Functions

struct cvmfs_nc_attrcvmfs_nc_attr_init ()
 
void cvmfs_nc_attr_free (struct cvmfs_nc_attr *nc_attr)
 
struct cvmfs_attrcvmfs_attr_init ()
 
void cvmfs_attr_free (struct cvmfs_attr *attr)
 
void cvmfs_set_log_fn (void(*log_fn)(const char *msg))
 
char * cvmfs_statistics_format (cvmfs_context *ctx)
 
cvmfs_option_mapcvmfs_options_init ()
 
cvmfs_option_mapcvmfs_options_init_v2 (int taint_environ)
 
void cvmfs_enable_threaded (cvmfs_context *ctx)
 
cvmfs_option_mapcvmfs_options_init_legacy (const char *legacy_options)
 
cvmfs_option_mapcvmfs_options_clone (cvmfs_option_map *opts)
 
cvmfs_option_mapcvmfs_options_clone_legacy (cvmfs_option_map *opts, const char *legacy_options)
 
void cvmfs_options_fini (cvmfs_option_map *opts)
 
void cvmfs_options_set (cvmfs_option_map *opts, const char *key, const char *value)
 
int cvmfs_options_parse (cvmfs_option_map *opts, const char *path)
 
void cvmfs_options_parse_default (cvmfs_option_map *opts, const char *fqrn)
 
void cvmfs_options_unset (cvmfs_option_map *opts, const char *key)
 
char * cvmfs_options_get (cvmfs_option_map *opts, const char *key)
 
char * cvmfs_options_dump (cvmfs_option_map *opts)
 
void cvmfs_options_free (char *value)
 
int cvmfs_init (char const *options)
 
cvmfs_errors cvmfs_init_v2 (cvmfs_option_map *opts)
 
void cvmfs_fini ()
 
cvmfs_contextcvmfs_attach_repo (char const *options)
 
cvmfs_errors cvmfs_attach_repo_v2 (const char *fqrn, cvmfs_option_map *opts, cvmfs_context **ctx)
 
void cvmfs_adopt_options (cvmfs_context *ctx, cvmfs_option_map *opts)
 
void cvmfs_detach_repo (cvmfs_context *ctx)
 
int cvmfs_remount (cvmfs_context *ctx)
 
int cvmfs_open (cvmfs_context *ctx, const char *path)
 
ssize_t cvmfs_pread (cvmfs_context *ctx, int fd, void *buf, size_t size, off_t off)
 
int cvmfs_close (cvmfs_context *ctx, int fd)
 
int cvmfs_readlink (cvmfs_context *ctx, const char *path, char *buf, size_t size)
 
int cvmfs_stat (cvmfs_context *ctx, const char *path, struct stat *st)
 
int cvmfs_lstat (cvmfs_context *ctx, const char *path, struct stat *st)
 
int cvmfs_stat_attr (cvmfs_context *ctx, const char *path, struct cvmfs_attr *attr)
 
int cvmfs_listdir (cvmfs_context *ctx, const char *path, char ***buf, size_t *buflen)
 
int cvmfs_listdir_contents (cvmfs_context *ctx, const char *path, char ***buf, size_t *listlen, size_t *buflen)
 
int cvmfs_listdir_stat (cvmfs_context *ctx, const char *path, struct cvmfs_stat_t **buf, size_t *listlen, size_t *buflen)
 
int cvmfs_stat_nc (cvmfs_context *ctx, const char *path, struct cvmfs_nc_attr *ncst)
 
int cvmfs_list_nc (cvmfs_context *ctx, const char *path, char ***buf, size_t *buflen)
 
void cvmfs_list_free (char **buf)
 
uint64_t cvmfs_get_revision (cvmfs_context *ctx)
 

Macro Definition Documentation

#define LIBCVMFS_FAIL_BADOPT   -7
#define LIBCVMFS_FAIL_INITCACHE   -5

Definition at line 57 of file libcvmfs.h.

Referenced by TranslateReturnValue().

#define LIBCVMFS_FAIL_INITQUOTA   -6

Definition at line 58 of file libcvmfs.h.

Referenced by TranslateReturnValue().

#define LIBCVMFS_FAIL_LOCKFILE   -4

Definition at line 56 of file libcvmfs.h.

Referenced by TranslateReturnValue().

#define LIBCVMFS_FAIL_MKCACHE   -2

Definition at line 54 of file libcvmfs.h.

Referenced by TranslateReturnValue().

#define LIBCVMFS_FAIL_NOFILES   -1

Definition at line 53 of file libcvmfs.h.

Referenced by TranslateReturnValue().

#define LIBCVMFS_FAIL_OK   0
#define LIBCVMFS_FAIL_OPENCACHE   -3

Definition at line 55 of file libcvmfs.h.

#define LIBCVMFS_REVISION   30

Definition at line 45 of file libcvmfs.h.

Referenced by LibGlobals::Initialize(), and libcvmfs_initialize().

#define LIBCVMFS_VERSION   2

This file is part of the CernVM File System.

NOTE: when adding or removing public symbols, you must also update the list in libcvmfs_public_syms.txt.

Not supported in the library:

  • Quota management
  • Asynchronous HTTP I/O
  • Automatic update of root file catalog
  • Tracer
  • Authz helper

Definition at line 18 of file libcvmfs.h.

#define LIBCVMFS_VERSION_MAJOR   LIBCVMFS_VERSION

Definition at line 19 of file libcvmfs.h.

Referenced by LibGlobals::Initialize(), and libcvmfs_initialize().

#define LIBCVMFS_VERSION_MINOR   9

Definition at line 20 of file libcvmfs.h.

Referenced by LibGlobals::Initialize(), and libcvmfs_initialize().

Typedef Documentation

typedef struct LibContext cvmfs_context

Definition at line 68 of file libcvmfs.h.

Definition at line 69 of file libcvmfs.h.

Enumeration Type Documentation

Error codes for cvmfs_init_v2() and cvmfs_attach_repo_v2(). Mirrors the failure codes in loader.h

Enumerator
LIBCVMFS_ERR_OK 
LIBCVMFS_ERR_UNKNOWN 
LIBCVMFS_ERR_OPTIONS 
LIBCVMFS_ERR_PERMISSION 
LIBCVMFS_ERR_MOUNT 
LIBCVMFS_ERR_LOADER_TALK 
LIBCVMFS_ERR_FUSE_LOOP 
LIBCVMFS_ERR_LOAD_LIBRARY 
LIBCVMFS_ERR_INCOMPATIBLE_VERSIONS 
LIBCVMFS_ERR_CACHE_DIR 
LIBCVMFS_ERR_PEERS 
LIBCVMFS_ERR_NFS_MAPS 
LIBCVMFS_ERR_QUOTA 
LIBCVMFS_ERR_MONITOR 
LIBCVMFS_ERR_TALK 
LIBCVMFS_ERR_SIGNATURE 
LIBCVMFS_ERR_CATALOG 
LIBCVMFS_ERR_MAINTENANCE_MODE 
LIBCVMFS_ERR_SAVE_STATE 
LIBCVMFS_ERR_RESTORE_STATE 
LIBCVMFS_ERR_OTHER_MOUNT 
LIBCVMFS_ERR_DOUBLE_MOUNT 
LIBCVMFS_ERR_HISTORY 
LIBCVMFS_ERR_WPAD 
LIBCVMFS_ERR_LOCK_WORKSPACE 
LIBCVMFS_ERR_REVISION_BLACKLISTED 

Definition at line 76 of file libcvmfs.h.

Function Documentation

void cvmfs_adopt_options ( cvmfs_context ctx,
cvmfs_option_map opts 
)

Transfer ownership of opts to the context ctx. The option map is automatically freed by cvmfs_detach_repo.

cvmfs_context* cvmfs_attach_repo ( char const *  options)

Initialize a CVMFS remote repository. Legacy. Use cvmfs_attach_repo_v2().

Parameters
[in]options,option1,option2,...
Returns
0 on success

Definition at line 490 of file libcvmfs_legacy.cc.

Here is the call graph for this function:

cvmfs_errors cvmfs_attach_repo_v2 ( const char *  fqrn,
cvmfs_option_map opts,
cvmfs_context **  ctx 
)

Creates a new repository context. On successful return, *ctx is not NULL and must be freed by a call to cvmfs_detach_repo(). Otherwise *ctx is NULL.

The cvmfs_option_map can be the global cvmfs_option_map pointer or a new pointer retrieved from cvmfs_options_clone(). If it is a new pointer, ownership can be transferred to the context by a call to cvmfs_adopt_options() so that the options map is free by cvmfs_detach_repo().

void cvmfs_attr_free ( struct cvmfs_attr attr)

Destroy the cvmfs_attr struct and frees the checksum, symlink, parent, name, and xattrs.

Parameters
attr,pointerto a cvmfs_attr struct to be deleted.

Destroy the cvmfs_attr struct and frees the checksum, symlink, name, and xattrs.

Definition at line 53 of file libcvmfs.cc.

Referenced by libcvmfs_has_file(), shrinkwrap::Sync(), and shrinkwrap::updateStat().

Here is the caller graph for this function:

struct cvmfs_attr* cvmfs_attr_init ( )

Create the cvmfs_attr struct which contains the same information as a stat, but also has pointers to the hash, symlink, and name. pointer to a cvmfs_attr struct

Create the cvmfs_attr struct which contains the same information as a stat, but also has pointers to the hash, symlink, and name.

Definition at line 39 of file libcvmfs.cc.

Referenced by libcvmfs_has_file(), shrinkwrap::Sync(), and shrinkwrap::updateStat().

Here is the caller graph for this function:

int cvmfs_close ( cvmfs_context ctx,
int  fd 
)

Close a file previously opened with cvmfs_open().

Parameters
[in]fd,filedescriptor to close
Returns
0 on success, -1 on failure (sets errno)

Definition at line 261 of file libcvmfs.cc.

Referenced by cvmfs_test_cat(), and libcvmfs_do_fclose().

Here is the call graph for this function:

Here is the caller graph for this function:

void cvmfs_detach_repo ( cvmfs_context ctx)

Uninitialize a cvmfs remote repository and release all resources for it. Works with both cvmfs_attach_repo() and cvmfs_attach_repo_v2().

Definition at line 514 of file libcvmfs.cc.

Referenced by cvmfs_test_detach(), and libcvmfs_finalize().

Here is the caller graph for this function:

void cvmfs_enable_threaded ( cvmfs_context ctx)

Definition at line 483 of file libcvmfs.cc.

Referenced by libcvmfs_initialize().

Here is the call graph for this function:

Here is the caller graph for this function:

void cvmfs_fini ( )

Shut down the CVMFS library and release all resources. The cvmfs_option_map object passed to cvmfs_init_v2 must be deleted afterwards by a call to cvmfs_options_fini().

Definition at line 531 of file libcvmfs.cc.

Referenced by libcvmfs_finalize(), and main().

Here is the call graph for this function:

Here is the caller graph for this function:

uint64_t cvmfs_get_revision ( cvmfs_context ctx)

Return the root file catalog revision

Definition at line 575 of file libcvmfs.cc.

Here is the call graph for this function:

int cvmfs_init ( char const *  options)

Initialize global CVMFS library structures. Legacy. Use cvmfs_init_v2(). Note: this must be called before any of the following functions.

Parameters
[in]options,option1,option2,...
Returns
0 on success

Definition at line 433 of file libcvmfs_legacy.cc.

Here is the call graph for this function:

cvmfs_errors cvmfs_init_v2 ( cvmfs_option_map opts)

Initializes the global cvmfs state based on a cvmfs_options_map. The cvmfs_fini() function works for both cvmfs_init() and cvmfs_init_v2()

void cvmfs_list_free ( char **  buf)

Free the items contained in list and then the list.

Parameters
[in]buf,pointerto the list that was allocated.

Definition at line 469 of file libcvmfs.cc.

Referenced by shrinkwrap::Sync().

Here is the caller graph for this function:

int cvmfs_list_nc ( cvmfs_context ctx,
const char *  path,
char ***  buf,
size_t *  buflen 
)

Get list of nested catalog at path. The list contents includes the empty string for the base and each nested catalog needed to reach this location. It also contains the list of nested catalogs reachable directly from the nested catalog serving this location. If this is a transition point, the nested catalog at this location is used.

On return, the array will contain a NULL-terminated list of strings. The caller must free the strings and the array containing them. The array (*buf) may be NULL when this function is called.

Parameters
[in]path,pathof nested catalog (e.g. /dir, not /cvmfs/repo/dir)
[out]buf,pointerto dynamically allocated NULL-terminated array of strings
[in]buflen,pointerto variable containing size of array
Returns
0 on success, -1 on failure (sets errno)

Definition at line 446 of file libcvmfs.cc.

Here is the call graph for this function:

int cvmfs_listdir ( cvmfs_context ctx,
const char *  path,
char ***  buf,
size_t *  buflen 
)

Get list of directory contents. The directory contents includes "." and "..".

On return, the array will contain a NULL-terminated list of strings. The caller must free the strings and the array containing them. The array (*buf) may be NULL when this function is called.

Parameters
[in]path,pathof directory (e.g. /dir, not /cvmfs/repo/dir)
[out]buf,pointerto dynamically allocated NULL-terminated array of strings
[in]buflen,pointerto variable containing size of array
Returns
0 on success, -1 on failure (sets errno)

Definition at line 353 of file libcvmfs.cc.

Referenced by cvmfs_test_list().

Here is the call graph for this function:

Here is the caller graph for this function:

int cvmfs_listdir_contents ( cvmfs_context ctx,
const char *  path,
char ***  buf,
size_t *  listlen,
size_t *  buflen 
)

Get list of directory contents. The list does not include "." or "..".

On return, the array will contain a NULL-terminated list of strings. The caller must free the strings and the array containing them. The array (*buf) may be NULL when this function is called.

Parameters
[in]path,pathof directory (e.g. /dir, not /cvmfs/repo/dir)
[out]buf,pointerto dynamically allocated NULL-terminated array of strings
[in]buflen,pointerto variable containing size of array
Returns
0 on success, -1 on failure (sets errno)

Definition at line 376 of file libcvmfs.cc.

Referenced by libcvmfs_list_dir().

Here is the call graph for this function:

Here is the caller graph for this function:

int cvmfs_listdir_stat ( cvmfs_context ctx,
const char *  path,
struct cvmfs_stat_t **  buf,
size_t *  listlen,
size_t *  buflen 
)

Get list of directory contents' stat info. The list does not include "." or "..".

On return,

Parameters
bufwill contain list of cvmfs_stat_t objects. The caller must free the cvmfs_stat_t::name and the array containing cvmfs_stat_t objects (*buf). The array (*buf) may be NULL when this function is called.
[in]path,pathof directory (e.g. /dir, not /cvmfs/repo/dir)
[out]buf,pointerto dynamically allocated array of cvmfs_stat_t
[in]buflen,pointerto variable containing size of
buf
in/out]listlen, pointer to number of entries in
buf.Set
listlento 0 before to fill
buffrom index 0.
Returns
0 on success, -1 on failure (sets errno)

Definition at line 399 of file libcvmfs.cc.

Here is the call graph for this function:

int cvmfs_lstat ( cvmfs_context ctx,
const char *  path,
struct stat *  st 
)

Get information about a file. If the file is a symlink, return info about the link, not the file it points to.

Parameters
[in]path,pathof file (e.g. /dir/file, not /cvmfs/repo/dir/file)
[out]st,statbuffer in which to write the result
Returns
0 on success, -1 on failure (sets errno)

Definition at line 313 of file libcvmfs.cc.

Here is the call graph for this function:

void cvmfs_nc_attr_free ( struct cvmfs_nc_attr nc_attr)

Frees the cvmfs_nc_attr struct passed, including freeing the mountpoint and hash.

Parameters
[in]nc_attr,pointerthe cvmfs_nc_attr to be destroyed

Definition at line 73 of file libcvmfs.cc.

Referenced by libcvmfs_list_dir().

Here is the caller graph for this function:

struct cvmfs_nc_attr* cvmfs_nc_attr_init ( )

Creates an empty cvmfs_nc_attr struct and returns the pointer to the user.

Returns
pointer to newly created cvmfs_nc_attr struct

Definition at line 66 of file libcvmfs.cc.

Referenced by libcvmfs_list_dir().

Here is the caller graph for this function:

int cvmfs_open ( cvmfs_context ctx,
const char *  path 
)

Open a file in the cvmfs cache.

Parameters
[in]path,pathto open (e.g. /dir/file, not /cvmfs/repo/dir/file)
Returns
read-only file descriptor, -1 on failure (sets errno)

Definition at line 227 of file libcvmfs.cc.

Here is the call graph for this function:

cvmfs_option_map* cvmfs_options_clone ( cvmfs_option_map opts)

Creates a new option map based on an existing one. Should be used to add repository specific options passed to cvmfs_attach_repo_v2() based on the global options that were passed to cvmfs_init_v2().

Referenced by cvmfs_options_clone_legacy(), and cvmfs_test_attach().

Here is the caller graph for this function:

cvmfs_option_map* cvmfs_options_clone_legacy ( cvmfs_option_map opts,
const char *  legacy_options 
)

Derives an option map based on the legacy option string that would be passed to the legacy function cvmfs_attach_repo(). Returns NULL if legacy_options is invalid. On success, the repository name is in the CVMFS_FQRN key in the options manager.

Referenced by cvmfs_attach_repo().

Here is the caller graph for this function:

char* cvmfs_options_dump ( cvmfs_option_map opts)

Prints the key-value pairs of cvmfs_option_map line-by-line. The resulting string needs to be freed by a call to cvmfs_options_free().

Referenced by cvmfs_test_attach(), and main().

Here is the caller graph for this function:

void cvmfs_options_fini ( cvmfs_option_map opts)

Frees the resources of a cvmfs_options_map, which was created either by a call to cvmfs_options_init() or by a call to cvmfs_options_clone().

Referenced by cvmfs_attach_repo(), cvmfs_test_attach(), and main().

Here is the caller graph for this function:

void cvmfs_options_free ( char *  value)

Frees a string returned from cvmfs_options_get() or cvmfs_options_dump().

Definition at line 32 of file libcvmfs_options.cc.

Referenced by cvmfs_test_attach(), and main().

Here is the caller graph for this function:

char* cvmfs_options_get ( cvmfs_option_map opts,
const char *  key 
)

Retrieves the value for a given key or NULL of the key does not exist. If the result is not NULL, it must be freed by a call to cvmfs_options_free().

Referenced by libcvmfs_initialize().

Here is the caller graph for this function:

cvmfs_option_map* cvmfs_options_init ( )

An option map must be created an populated before calling cvmfs_init_v2().

Definition at line 55 of file libcvmfs_options.cc.

Referenced by cvmfs_attach_repo(), cvmfs_options_init_legacy(), and main().

Here is the call graph for this function:

Here is the caller graph for this function:

cvmfs_option_map* cvmfs_options_init_legacy ( const char *  legacy_options)

Creates a new option map based on the legacy option string that would be passed to the legacy function cvmfs_init(). Returns NULL if legacy_options is invalid.

Definition at line 391 of file libcvmfs_legacy.cc.

Referenced by cvmfs_init().

Here is the call graph for this function:

Here is the caller graph for this function:

cvmfs_option_map* cvmfs_options_init_v2 ( int  taint_environ)

Like cvmfs_options_init but let decide whether or not cvmfs options make it to the process environment. Relevant for resolving symbolic links.

Definition at line 60 of file libcvmfs_options.cc.

Referenced by cvmfs_options_init(), and libcvmfs_initialize().

Here is the call graph for this function:

Here is the caller graph for this function:

int cvmfs_options_parse ( cvmfs_option_map opts,
const char *  path 
)

Sets options from a file with linewise KEY=VALUE pairs. Returns 0 on success and -1 otherwise.

Referenced by libcvmfs_initialize().

Here is the caller graph for this function:

void cvmfs_options_parse_default ( cvmfs_option_map opts,
const char *  fqrn 
)

Sets default options from repository defaults in /etc/cvmfs. Returns 0 on success and -1 otherwise.

void cvmfs_options_set ( cvmfs_option_map opts,
const char *  key,
const char *  value 
)

Fills a cvmfs_options_map. Use the same key/value pairs as the configuration parameters used by the fuse module in /etc/cvmfs/...

Referenced by cvmfs_test_attach(), libcvmfs_initialize(), and main().

Here is the caller graph for this function:

void cvmfs_options_unset ( cvmfs_option_map opts,
const char *  key 
)

Removes a key-value pair from a cvmfs_options_map. The key may or may not exist before the call.

ssize_t cvmfs_pread ( cvmfs_context ctx,
int  fd,
void *  buf,
size_t  size,
off_t  off 
)

Read from a file descriptor returned by cvmfs_open(). File descriptors that have bit 30 set indicate chunked files.

Definition at line 245 of file libcvmfs.cc.

Referenced by libcvmfs_do_fread().

Here is the call graph for this function:

Here is the caller graph for this function:

int cvmfs_readlink ( cvmfs_context ctx,
const char *  path,
char *  buf,
size_t  size 
)

Read a symlink from the catalog. Environment variables in the symlink that are of the form are expanded according to the process' environment variables. If the provided buffer is not long enough for the null-terminated value of the symlink, -1 is returned and errno is set to ERANGE.

Parameters
[in]path,pathof symlink (e.g. /dir/file, not /cvmfs/repo/dir/file)
[out]buf,bufferin which to write the null-terminated value of the symlink
[in]size,sizeof buffer
Returns
0 on success, -1 on failure (sets errno)

Definition at line 272 of file libcvmfs.cc.

Here is the call graph for this function:

int cvmfs_remount ( cvmfs_context ctx)

Load a new catalog if there is one.

Returns
0 on success (up to date or new catalog loaded), -1 otherwise

Definition at line 569 of file libcvmfs.cc.

Here is the call graph for this function:

void cvmfs_set_log_fn ( void(*)(const char *msg)  log_fn)

Send syslog and debug messages to log_fn instead. This may (and probably should) be called before any other routine. Setting this to NULL restores the default logging behavior.

Definition at line 550 of file libcvmfs.cc.

Referenced by libcvmfs_initialize(), and main().

Here is the call graph for this function:

Here is the caller graph for this function:

int cvmfs_stat ( cvmfs_context ctx,
const char *  path,
struct stat *  st 
)

Get information about a file. If the file is a symlink, return info about the file it points to, not the symlink itself.

Parameters
[in]path,pathof file (e.g. /dir/file, not /cvmfs/repo/dir/file)
[out]st,statbuffer in which to write the result
Returns
0 on success, -1 on failure (sets errno)

Definition at line 295 of file libcvmfs.cc.

Referenced by cvmfs_test_list().

Here is the call graph for this function:

Here is the caller graph for this function:

int cvmfs_stat_attr ( cvmfs_context ctx,
const char *  path,
struct cvmfs_attr attr 
)

Get the extended CVMFS information about a file. If the file is a symlink, return info about the link, not the file it points to.

Parameters
[in]path,pathof file (e.g. /dir/file, not /cvmfs/repo/dir/file)
[out]attr,cvmfs_attrstruct in which to write the result
Returns
0 on success, -1 on failure

Definition at line 331 of file libcvmfs.cc.

Referenced by libcvmfs_get_stat(), and libcvmfs_has_file().

Here is the call graph for this function:

Here is the caller graph for this function:

int cvmfs_stat_nc ( cvmfs_context ctx,
const char *  path,
struct cvmfs_nc_attr ncst 
)

Get the CVMFS information about a nested catalog. The information returned pertains to the catalog that serves this path, if this path is a transition point, then the information is about this transition point.

Parameters
[in]path,pathof nested catalog (e.g. /dir, not /cvmfs/repo/dir)
[out]ncst,cvmfs_nc_attrbuffer in which to write the result
Returns
0 on success, -1 on failure

Definition at line 424 of file libcvmfs.cc.

Referenced by libcvmfs_list_dir().

Here is the call graph for this function:

Here is the caller graph for this function:

char* cvmfs_statistics_format ( cvmfs_context ctx)

Get runtime statistics formatted as a string. The raw counters are also available via cvmfs_talk when using the FUSE module. cvmfs_statistics() allocates a new string, which the caller must free. Returns NULL if insufficient memory was available.

Definition at line 561 of file libcvmfs.cc.

Here is the call graph for this function: