Ruby: win32/file.h Source File

Ruby 3.2.5p208 (2024-07-26 revision 31d0f1a2e7dbfb60731d1f05b868e1d578cda493)

file.h
1#ifndef RUBY_WIN32_FILE_H
2#define RUBY_WIN32_FILE_H
3
4#ifndef IO_REPARSE_TAG_AF_UNIX
5# define IO_REPARSE_TAG_AF_UNIX 0x80000023
6#endif
7
8enum {
9 MINIMUM_REPARSE_BUFFER_PATH_LEN = 100
10};
11/* License: Ruby's */
12 typedef struct {
13 ULONG ReparseTag;
14 USHORT ReparseDataLength;
15 USHORT Reserved;
16 union {
17 struct {
18 USHORT SubstituteNameOffset;
19 USHORT SubstituteNameLength;
20 USHORT PrintNameOffset;
21 USHORT PrintNameLength;
22 ULONG Flags;
23 WCHAR PathBuffer[MINIMUM_REPARSE_BUFFER_PATH_LEN];
24 } SymbolicLinkReparseBuffer;
25 struct {
26 USHORT SubstituteNameOffset;
27 USHORT SubstituteNameLength;
28 USHORT PrintNameOffset;
29 USHORT PrintNameLength;
30 WCHAR PathBuffer[MINIMUM_REPARSE_BUFFER_PATH_LEN];
31 } MountPointReparseBuffer;
32 };
33} rb_w32_reparse_buffer_t;
34
35#define rb_w32_reparse_buffer_size(n) \
36 (sizeof(rb_w32_reparse_buffer_t) + \
37 sizeof(WCHAR)*((n)-MINIMUM_REPARSE_BUFFER_PATH_LEN))
38
39int rb_w32_read_reparse_point(const WCHAR *path, rb_w32_reparse_buffer_t *rp,
40 size_t bufsize, WCHAR **result, DWORD *len);
41
42int lchown(const char *path, int owner, int group);
43int rb_w32_ulchown(const char *path, int owner, int group);
44int fchmod(int fd, int mode);
45#define HAVE_FCHMOD 0
46
47UINT rb_w32_filecp(void);
48WCHAR *rb_w32_home_dir(void);
49
50#endif /* RUBY_WIN32_FILE_H */
rb_w32_reparse_buffer_t
Definition file.h:12