# Working copy context
[Working copy management]

## Typedefs
typedef struct svn_wc_context_t | svn_wc_context_t
| The context for all working copy interactions.
## Functions
svn_error_t * | svn_wc_context_create (svn_wc_context_t **wc_ctx, const svn_config_t *config, apr_pool_t *result_pool, apr_pool_t *scratch_pool)
| Create a context for the working copy, and return it in *wc_ctx.
svn_error_t * | svn_wc_context_destroy (svn_wc_context_t *wc_ctx)
| Destroy the working copy context described by wc_ctx, releasing any acquired resources.

## Typedef Documentation

typedef struct svn_wc_context_t svn_wc_context_t

The context for all working copy interactions.

This is the client-facing datastructure API consumers are required to create and use when interacting with a working copy. Multiple contexts can be created for the same working copy simultaneously, within the same process or different processes. Context mutexing will be handled internally by the working copy library.

Note:
  : svn_wc_context_t should be passed by non-const pointer in all APIs, even for read-only operations, as it contains mutable data (caching, etc.).

Since:
  New in 1.7.

Definition at line 179 of file svn_wc.h.

## Function Documentation

svn_error_t* svn_wc_context_create | ( | svn_wc_context_t ** | wc_ctx,
|  | const svn_config_t * | config,
|  | apr_pool_t * | result_pool,
|  | apr_pool_t * | scratch_pool |
| ) |  |  |

Create a context for the working copy, and return it in *wc_ctx.

This context is not associated with a particular working copy, but as operations are performed, will load the appropriate working copy information.

config should hold the various configuration options that may apply to this context. It should live at least as long as result_pool. It may be `NULL`.

The context will be allocated in result_pool, and will use result_pool for any internal allocations requiring the same longevity as the context. The context will be automatically destroyed, and its resources released, when result_pool is cleared, or it may be manually destroyed by invoking svn_wc_context_destroy().

Use scratch_pool for temporary allocations. It may be cleared immediately upon returning from this function.

Since:
  New in 1.7.

svn_error_t* svn_wc_context_destroy | ( | svn_wc_context_t * | wc_ctx | ) |

Destroy the working copy context described by wc_ctx, releasing any acquired resources.

Since:
  New in 1.7.

All Data Structures Files Functions Variables Typedefs Enumerations Enumerator Defines