Ruby  3.4.0dev (2024-11-23 revision b4d13fac3dd5420475aa1e14fdad8137da7e3ee0)
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 
8 enum {
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  };
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 
39 int rb_w32_read_reparse_point(const WCHAR *path, rb_w32_reparse_buffer_t *rp,
40  size_t bufsize, WCHAR **result, DWORD *len);
41 
42 int lchown(const char *path, int owner, int group);
43 int rb_w32_ulchown(const char *path, int owner, int group);
44 int fchmod(int fd, int mode);
45 #define HAVE_FCHMOD 0
46 
47 UINT rb_w32_filecp(void);
48 WCHAR *rb_w32_home_dir(void);
49 
50 rb_pid_t rb_w32_uspawn_process(int mode, const char *prog, char *const *argv,
51  int in_fd, int out_fd, int err_fd, DWORD flags);
52 
53 #endif /* RUBY_WIN32_FILE_H */
int len
Length of the buffer.
Definition: io.h:8