Imported Upstream version 3.3.0
[platform/upstream/libarchive.git] / doc / text / archive_entry_paths.3.txt
1 ARCHIVE_ENTRY_PATHS(3)   BSD Library Functions Manual   ARCHIVE_ENTRY_PATHS(3)
2
3 NAME
4      archive_entry_hardlink, archive_entry_hardlink_w,
5      archive_entry_set_hardlink, archive_entry_copy_hardlink,
6      archive_entry_copy_hardlink_w, archve_entry_update_hardlink_utf8,
7      archive_entry_set_link, archive_entry_copy_link,
8      archive_entry_copy_link_w, archve_entry_update_link_utf8,
9      archive_entry_pathname, archive_entry_pathname_w,
10      archive_entry_set_pathname, archive_entry_copy_pathname,
11      archive_entry_copy_pathname_w, archve_entry_update_pathname_utf8,
12      archive_entry_sourcepath, archive_entry_copy_sourcepath,
13      archive_entry_symlink, archive_entry_symlink_w,
14      archive_entry_set_symlink, archive_entry_copy_symlink,
15      archive_entry_copy_symlink_w, archve_entry_update_symlink_utf8 — func‐
16      tions for manipulating path names in archive entry descriptions
17
18 LIBRARY
19      Streaming Archive Library (libarchive, -larchive)
20
21 SYNOPSIS
22      #include <archive_entry.h>
23
24      const char *
25      archive_entry_hardlink(struct archive_entry *a);
26
27      const wchar_t *
28      archive_entry_hardlink_w(struct archive_entry *a);
29
30      void
31      archive_entry_set_hardlink(struct archive_entry *a, const char *path);
32
33      void
34      archive_entry_copy_hardlink(struct archive_entry *a, const char *path);
35
36      void
37      archive_entry_copy_hardlink_w(struct archive_entry *a, const, wchar_t,
38          *path");
39
40      int
41      archive_entry_update_hardlink_utf8(struct archive_entry *a,
42          const char *path);
43
44      void
45      archive_entry_set_link(struct archive_entry *a, const char *path);
46
47      void
48      archive_entry_copy_link(struct archive_entry *a, const char *path);
49
50      void
51      archive_entry_copy_link_w(struct archive_entry *a, const wchar_t *path);
52
53      int
54      archive_entry_update_link_utf8(struct archive_entry *a,
55          const char *path);
56
57      const char *
58      archive_entry_pathname(struct archive_entry *a);
59
60      const wchar_t *
61      archive_entry_pathname_w(struct archive_entry *a);
62
63      void
64      archive_entry_set_pathname(struct archive_entry *a, const char *path);
65
66      void
67      archive_entry_copy_pathname(struct archive_entry *a, const char *path);
68
69      void
70      archive_entry_copy_pathname_w(struct archive_entry *a,
71          const wchar_t *path);
72
73      int
74      archive_entry_update_pathname_utf8(struct archive_entry *a,
75          const char *path);
76
77      const char *
78      archive_entry_sourcepath(struct archive_entry *a);
79
80      void
81      archive_entry_copy_sourcepath(struct archive_entry *a, const char *path);
82
83      const char *
84      archive_entry_symlink(struct archive_entry *a);
85
86      const wchar_t *
87      archive_entry_symlink_w(struct archive_entry *a);
88
89      void
90      archive_entry_set_symlink(struct archive_entry *a, const char *path);
91
92      void
93      archive_entry_copy_symlink(struct archive_entry *a, const char *path);
94
95      void
96      archive_entry_copy_symlink_w(struct archive_entry *a,
97          const wchar_t *path);
98
99      int
100      archive_entry_update_symlink_utf8(struct archive_entry *a,
101          const char *path);
102
103 DESCRIPTION
104      Path names supported by archive_entry(3):
105      hardlink    Destination of the hardlink.
106      link        Update only.  For a symlink, update the destination.  Other‐
107                  wise, make the entry a hardlink and alter the destination for
108                  that.
109      pathname    Path in the archive
110      sourcepath  Path on the disk for use by archive_read_disk(3).
111      symlink     Destination of the symbolic link.
112
113      Path names can be provided in one of three different ways:
114
115      char *     Multibyte strings in the current locale.
116
117      wchar_t *  Wide character strings in the current locale.  The accessor
118                 functions are named XXX_w().
119
120      UTF-8      Unicode strings encoded as UTF-8.  This are convience func‐
121                 tions to update both the multibyte and wide character strings
122                 at the same time.
123
124      The sourcepath is a pure filesystem concept and never stored in an ar‐
125      chive directly.
126
127      For that reason, it is only available as multibyte string.  The link path
128      is a convience function for conditionally setting hardlink or symlink
129      destination.  It doesn't have a corresponding get accessor function.
130
131      archive_entry_set_XXX() is an alias for archive_entry_copy_XXX().
132
133 SEE ALSO
134      archive_entry(3) libarchive(3),
135
136 BSD                            February 2, 2012                            BSD