fs_umode_to_ftype(9)

πŸ“¦ version 7.3.1, in nixpkgs unstable

πŸ’… fs_umode_to_ftype(9)

okay so bestie, welcome to the Kernel API Manual β€” this one's a lil kernel function called fs_umode_to_ftype, and honestly? it's giving translator energy. let's get into it 🫢


✨ NAME ✨

fs_umode_to_ftype β€” file mode to on-disk file type. yeah. that's the whole vibe. it takes a mode and hands you back the on-disk type. iconic behavior tbh πŸ’…


🌸 SYNOPSIS 🌸

unsigned char fs_umode_to_ftype (umode_t mode );

that's it. one arg, one return, no drama. ✨


πŸŽ€ ARGUMENTS πŸŽ€

  • mode β€” the file mode you wanna convert, bestie. just hand it over and it'll do the thing πŸ’–

πŸ¦‹ DESCRIPTION πŸ¦‹

so like, this function converts the file mode value to the on-disk file type (the FT_* situation). lowkey a glow-up for your umode_t, fr fr ✨


πŸ’œ CONTEXT πŸ’œ

Any context. no cap, any. call it wherever, whenever. it's not picky, she's flexible 🧚


πŸ‘‘ RETURN πŸ‘‘

here's the menu of possible answers, and yes every single one is listed because we don't skip:

  • FT_UNKNOWN β€” unknown type πŸ™ˆ
  • FT_REG_FILE β€” regular file πŸ“
  • FT_DIR β€” directory πŸ’–
  • FT_CHRDEV β€” character device ✨
  • FT_BLKDEV β€” block device πŸŽ€
  • FT_FIFO β€” FIFO 🌸
  • FT_SOCK β€” local-domain socket πŸ¦‹
  • FT_SYMLINK β€” symbolic link πŸ”₯

eight options, all accounted for, periodt πŸ’…


🌈 SEE ALSO 🌈

like, go read those too, they're the friend group iykyk 🫢


πŸ’€ reminder bestie: this page lives in ./fs and it's dated October 2026 β€” that's the source/version + date energy, mwah πŸ’‹

that's the whole page, you ate it, so proud of you, see you in the next man πŸ§šβ€β™€οΈβœ¨πŸ’…

πŸ“¦ where this page comes from