Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func ExtractTarFile ¶
ExtractTarFile untars a single file from a given src to a destination
adjustLink: Whether to automatically correct the symbolic link, only the absolute path is affected, and the symbolic link based on relative path is not affected
For example, suppose we have a tar file:
tar ├── file_1 └── file_2 -> /file_1
and want to extract to dir '/target',
If adjustLink set to false, then the target dir looks like:
target ├── file_1 └── file_2 -> /file_1 # symlink broken, it not really point to file_1, since it's an abs path
yes, it is same with files in tarball
And if adjustLink set to true, the target dir will become:
target ├── file_1 └── file_2 -> /target/file_1
as you can see, file_2's symlink was auto adjusted to /target/file_1
Types ¶
This section is empty.
Click to show internal directories.
Click to hide internal directories.