fs_umode_to_dtype(9)
π fs_umode_to_dtype(9) β the Kernel API Manual moment
okay so bestie, we're in the kernel API manual (9 section, that's the kernel one, iykyk) and today's main character is fs_umode_to_dtype. she does exactly one thing and she does it slayfully.
β¨ NAME β¨
fs_umode_to_dtype β file mode to dirent file type. that's it. that's the whole job. π
π¦ SYNOPSIS π¦
unsigned char fs_umode_to_dtype (umode_t mode );
literally just hand her a mode and she hands you back an unsigned char. no drama, no side quests. π
πΈ ARGUMENTS πΈ
modeβ the file mode you wanna convert. that's the input, bestie, that's what you're feeding her. π
π DESCRIPTION π
so like, this function converts the file mode value to the directory entry type (DT_*). that's the vibe. mode in, DT_* out. she's the translator in the group chat between "file mode" and "dirent type" and honestly? she never misses. π
β¨
π§ CONTEXT π§
any context. any. not me being flexible about it β she genuinely does not care where you call her from. π
β RETURN β
here's the whole menu of what she might hand back:
DT_UNKNOWNβ unknown type πDT_FIFOβ FIFODT_CHRβ character deviceDT_DIRβ directoryDT_BLKβ block deviceDT_REGβ regular fileDT_LNKβ symbolic linkDT_SOCKβ local-domain socket
eight whole options and every single one of them is valid. no cap. π₯
π SEE ALSO π
- Kernel file
./fs/fs_dirent.c fs_ftype_to_dtype(9)fs_umode_to_ftype(9)
(her friends!! the ftype girlies!! go read them too, they're iconic π«Ά)
and that's the page, bestie β sourced from ./fs, dated October 2026, brought to you by the fs_umode_to_dtype(9) girlies themselves. mwah. πππ¦
π¦ where this page comes from
- nixpkgs unstable: linux-manual 7.3.1
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash-1017 on : a language model's rewrite of the original, under its terms