diff options
Diffstat (limited to 'src/Native/Unix/System.Native/pal_io.h')
-rw-r--r-- | src/Native/Unix/System.Native/pal_io.h | 23 |
1 files changed, 23 insertions, 0 deletions
diff --git a/src/Native/Unix/System.Native/pal_io.h b/src/Native/Unix/System.Native/pal_io.h index aab12e6ed3..f13cdc6606 100644 --- a/src/Native/Unix/System.Native/pal_io.h +++ b/src/Native/Unix/System.Native/pal_io.h @@ -35,6 +35,7 @@ struct FileStatus int64_t BirthTimeNsec; // nanosecond part int64_t Dev; // ID of the device containing the file int64_t Ino; // inode number of the file + uint32_t UserFlags; // user defined flags }; /* Provide consistent access to nanosecond fields, if they exist. */ @@ -154,6 +155,14 @@ enum }; /** + * Constants for interpreting FileStatus.UserFlags. + */ +enum +{ + PAL_UF_HIDDEN = 0x8000 +}; + +/** * Constants from dirent.h for the inode type returned from readdir variants */ enum NodeType @@ -751,6 +760,20 @@ DLLEXPORT int32_t SystemNative_GetPeerID(intptr_t socket, uid_t* euid); DLLEXPORT int32_t SystemNative_LockFileRegion(intptr_t fd, int64_t offset, int64_t length, int16_t lockType); /** +* Changes the file flags of the file whose location is specified in path +* +* Returns 0 for success, -1 for failure. Sets errno for failure. +*/ +DLLEXPORT int32_t SystemNative_LChflags(const char* path, uint32_t flags); + +/** + * Determines if the current platform supports setting UF_HIDDEN (0x8000) flag + * + * Returns true (non-zero) if supported, false (zero) if not. + */ +DLLEXPORT int32_t SystemNative_LChflagsCanSetHiddenFlag(void); + +/** * Creates a symbolic link at "linkPath", pointing at "target". * "target" may or may not exist (dangling symbolic links are valid filesystem objects) * Returns 0 on success; otherwise, returns -1 and errno is set. |