X-Git-Url: https://feistymeow.org/gitweb/?a=blobdiff_plain;f=nucleus%2Flibrary%2Ffilesystem%2Ffilename.cpp;h=2a97d3a44683112f17c371bef79be50d48693f5f;hb=7a381305a6cd14cf4254b6259a3ffb0e1912b390;hp=1ab0c0d496dabf4c1503e3414b9fc5ebb871bda6;hpb=5fcd199a90e9e3e68e50b7644a091ad8fa20027a;p=feisty_meow.git diff --git a/nucleus/library/filesystem/filename.cpp b/nucleus/library/filesystem/filename.cpp index 1ab0c0d4..2a97d3a4 100644 --- a/nucleus/library/filesystem/filename.cpp +++ b/nucleus/library/filesystem/filename.cpp @@ -304,6 +304,18 @@ bool filename::is_executable() const return !!(fill.st_mode & S_IEXEC); } +bool filename::is_normal() const +{ + status_info fill; + if (!get_info(&fill)) + return false; + bool weird = S_ISCHR(fill.st_mode) + || S_ISBLK(fill.st_mode) + || S_ISFIFO(fill.st_mode) + || S_ISSOCK(fill.st_mode); + return !weird; +} + int filename::find_last_separator(const astring &look_at) const { int last_sep = -1;