.\" This manpage has been automatically generated by docbook2man
.\" from a DocBook document. This tool can be found at:
.\"
.\" Please send any bug reports, improvements, comments, patches,
.\" etc. to Steve Cheng .
.TH "NTFS_LOOKUP_INODE_BY_NAME" "9" "09 October 2005" "" ""
.SH NAME
ntfs_lookup_inode_by_name \- find an inode in a directory given its name
.SH SYNOPSIS
"SYNOPSIS"
.sp
\fB
.sp
u64 ntfs_lookup_inode_by_name (ntfs_inode * \fIdir_ni\fB, const ntfschar * \fIuname\fB, const int \fIuname_len\fB);
\fR
.SH "ARGUMENTS"
.TP
\fB\fIdir_ni\fB\fR
ntfs inode of the directory in which to search for the name
.TP
\fB\fIuname\fB\fR
Unicode name for which to search in the directory
.TP
\fB\fIuname_len\fB\fR
length of the name \fIuname\fR in Unicode characters
.SH "DESCRIPTION"
.PP
Look for an inode with name \fIuname\fR in the directory with inode \fIdir_ni\fR\&.
\fBntfs_lookup_inode_by_name\fR walks the contents of the directory looking for
the Unicode name. If the name is found in the directory, the corresponding
inode number (>= 0) is returned as a mft reference in cpu format, i.e. it
is a 64-bit number containing the sequence number.
.PP
On error, a negative value is returned corresponding to the error code. In
particular if the inode is not found -ENOENT is returned. Note that you
can't just check the return value for being negative, you have to check the
inode number for being negative which you can extract using MREC(return
value).
.PP
Note, \fIuname_len\fR does not include the (optional) terminating NULL character.