# EOL conversion and keyword expansion
[Working copy management]

## Functions
svn_error_t * | svn_wc_translated_file2 (const char **xlated_path, const char *src, const char *versioned_file, svn_wc_adm_access_t *adm_access, apr_uint32_t flags, apr_pool_t *pool)
| Set xlated_path to a translated copy of src or to src itself if no translation is necessary.
svn_error_t * | svn_wc_translated_file (const char **xlated_p, const char *vfile, svn_wc_adm_access_t *adm_access, svn_boolean_t force_repair, apr_pool_t *pool)
| Same as svn_wc_translated_file2, but will never clean up temporary files.
svn_error_t * | svn_wc_translated_stream (svn_stream_t **stream, const char *path, const char *versioned_file, svn_wc_adm_access_t *adm_access, apr_uint32_t flags, apr_pool_t *pool)
| Returns a stream allocated in pool with access to the given path taking the file properties from versioned_file using adm_access.

## Function Documentation

svn_error_t* svn_wc_translated_file | ( | const char ** | xlated_p,
|  | const char * | vfile,
|  | svn_wc_adm_access_t * | adm_access,
|  | svn_boolean_t | force_repair,
|  | apr_pool_t * | pool |
| ) |  |  |

Same as svn_wc_translated_file2, but will never clean up temporary files.

Deprecated:
  Provided for compatibility with the 1.3 API

svn_error_t* svn_wc_translated_file2 | ( | const char ** | xlated_path,
|  | const char * | src,
|  | const char * | versioned_file,
|  | svn_wc_adm_access_t * | adm_access,
|  | apr_uint32_t | flags,
|  | apr_pool_t * | pool |
| ) |  |  |

Set xlated_path to a translated copy of src or to src itself if no translation is necessary.

That is, if versioned_file's properties indicate newline conversion or keyword expansion, point *xlated_path to a copy of src whose newlines and keywords are converted using the translation as requested by flags.

If cancel_func is non-NULL, call it with cancel_baton to determine if the client has canceled the operation.

When translating to the normal form, inconsistent eol styles will be repaired when appropriate for the given setting. When translating from normal form, no EOL repair is performed (consistency is assumed). This behaviour can be overridden by specifying SVN_WC_TRANSLATE_FORCE_EOL_REPAIR.

The caller can explicitly request a new file to be returned by setting the SVN_WC_TRANSLATE_FORCE_COPY flag in flags.

This function is generally used to get a file that can be compared meaningfully against versioned_file's text base, if `SVN_WC_TRANSLATE_TO_NF` is specified, against versioned_file itself if `SVN_WC_TRANSLATE_FROM_NF` is specified.

If a new output file is created, it is created in the temp file area belonging to versioned_file. By default it will be deleted at pool cleanup. If `SVN_WC_TRANSLATE_NO_OUTPUT_CLEANUP` is specified, the default pool cleanup handler to remove *xlated_path is not registered. If the input file is returned as the output, its lifetime is not specified.

If an error is returned, the effect on *xlated_path is undefined.

Since:
  New in 1.4

Deprecated:
  Provided for compatibility with the 1.6 API

svn_error_t* svn_wc_translated_stream | ( | svn_stream_t ** | stream,
|  | const char * | path,
|  | const char * | versioned_file,
|  | svn_wc_adm_access_t * | adm_access,
|  | apr_uint32_t | flags,
|  | apr_pool_t * | pool |
| ) |  |  |

Returns a stream allocated in pool with access to the given path taking the file properties from versioned_file using adm_access.

If flags includes SVN_WC_TRANSLATE_FROM_NF, the stream will translate from Normal Form to working copy form while writing to path; stream read operations are not supported. Conversely, if flags includes SVN_WC_TRANSLATE_TO_NF, the stream will translate from working copy form to Normal Form while reading from path; stream write operations are not supported.

The flags are the same constants as those used for svn_wc_translated_file2().

Since:
  New in 1.5.

Deprecated:
  Provided for compatibility with the 1.6 API.

All Data Structures Files Functions Variables Typedefs Enumerations Enumerator Defines