2 * dir.h - Exports for directory handling. Part of the Linux-NTFS project.
4 * Copyright (c) 2002 Anton Altaparmakov
6 * This program/include file is free software; you can redistribute it and/or
7 * modify it under the terms of the GNU General Public License as published
8 * by the Free Software Foundation; either version 2 of the License, or
9 * (at your option) any later version.
11 * This program/include file is distributed in the hope that it will be
12 * useful, but WITHOUT ANY WARRANTY; without even the implied warranty
13 * of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
14 * GNU General Public License for more details.
16 * You should have received a copy of the GNU General Public License
17 * along with this program (in the main directory of the Linux-NTFS
18 * distribution in the file COPYING); if not, write to the Free Software
19 * Foundation,Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
27 /* The little endian Unicode string $I30 as a global constant. */
28 extern uchar_t I30[5];
30 extern u64 ntfs_inode_lookup_by_name(ntfs_inode *dir_ni,
31 const uchar_t *uname, const int uname_len);
34 * File types (adapted from include <linux/fs.h>)
36 #define NTFS_DT_UNKNOWN 0
37 #define NTFS_DT_FIFO 1
42 #define NTFS_DT_LNK 10
43 #define NTFS_DT_SOCK 12
44 #define NTFS_DT_WHT 14
47 * This is the "ntfs_filldir" function type, used by ntfs_readdir() to let
48 * the caller specify what kind of dirent layout it wants to have.
49 * This allows the caller to read directories into their application or
50 * to have different dirent layouts depending on the binary type.
52 typedef int (*ntfs_filldir_t)(void *dirent, const uchar_t *name,
53 const int name_len, const int name_type, const s64 pos,
54 const MFT_REF mref, const unsigned dt_type);
56 extern int ntfs_readdir(ntfs_inode *dir_ni, s64 *pos,
57 void *dirent, ntfs_filldir_t filldir);
59 #endif /* defined _NTFS_DIR_H */