Changeset View
Changeset View
Standalone View
Standalone View
lib/libc/sys/unlink.2
Show All 22 Lines | |||||
.\" HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT | .\" HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT | ||||
.\" LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY | .\" LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY | ||||
.\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF | .\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF | ||||
.\" SUCH DAMAGE. | .\" SUCH DAMAGE. | ||||
.\" | .\" | ||||
.\" @(#)unlink.2 8.1 (Berkeley) 6/4/93 | .\" @(#)unlink.2 8.1 (Berkeley) 6/4/93 | ||||
.\" $FreeBSD$ | .\" $FreeBSD$ | ||||
.\" | .\" | ||||
.Dd December 1, 2017 | .Dd October 20, 2018 | ||||
.Dt UNLINK 2 | .Dt UNLINK 2 | ||||
.Os | .Os | ||||
.Sh NAME | .Sh NAME | ||||
.Nm unlink , | .Nm unlink , | ||||
.Nm unlinkat | .Nm unlinkat | ||||
.Nd remove directory entry | .Nd remove directory entry | ||||
.Sh LIBRARY | .Sh LIBRARY | ||||
.Lb libc | .Lb libc | ||||
▲ Show 20 Lines • Show All 44 Lines • ▼ Show 20 Lines | |||||
.In fcntl.h : | .In fcntl.h : | ||||
.Bl -tag -width indent | .Bl -tag -width indent | ||||
.It Dv AT_REMOVEDIR | .It Dv AT_REMOVEDIR | ||||
Remove the directory entry specified by | Remove the directory entry specified by | ||||
.Fa fd | .Fa fd | ||||
and | and | ||||
.Fa path | .Fa path | ||||
as a directory, not a normal file. | as a directory, not a normal file. | ||||
.It Dv AT_BENEATH | |||||
Do not allow to unlink to a file which is not a child of the starting | |||||
directory. | |||||
.El | .El | ||||
.Pp | .Pp | ||||
If | If | ||||
.Fn unlinkat | .Fn unlinkat | ||||
is passed the special value | is passed the special value | ||||
.Dv AT_FDCWD | .Dv AT_FDCWD | ||||
in the | in the | ||||
.Fa fd | .Fa fd | ||||
▲ Show 20 Lines • Show All 95 Lines • ▼ Show 20 Lines | |||||
.It Bq Er ENOTDIR | .It Bq Er ENOTDIR | ||||
The | The | ||||
.Fa path | .Fa path | ||||
argument is not an absolute path and | argument is not an absolute path and | ||||
.Fa fd | .Fa fd | ||||
is neither | is neither | ||||
.Dv AT_FDCWD | .Dv AT_FDCWD | ||||
nor a file descriptor associated with a directory. | nor a file descriptor associated with a directory. | ||||
.It Bq Er ENOTCAPABLE | |||||
.Fa path | |||||
was absolute or a ".." component leading to a directory outside of | |||||
the directory hierarchy rooted by the start directory, and the | |||||
.Dv AT_BENEATH | |||||
flag was specified. | |||||
.El | .El | ||||
.Sh SEE ALSO | .Sh SEE ALSO | ||||
.Xr chflags 2 , | .Xr chflags 2 , | ||||
.Xr close 2 , | .Xr close 2 , | ||||
.Xr link 2 , | .Xr link 2 , | ||||
.Xr rmdir 2 , | .Xr rmdir 2 , | ||||
.Xr symlink 7 | .Xr symlink 7 | ||||
.Sh STANDARDS | .Sh STANDARDS | ||||
Show All 18 Lines |