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