ObjFW  Diff

Differences From Artifact [b0b9385012]:

To Artifact [dcca7be75f]:


58
59
60
61
62
63
64
65

66
67



68
69
70
71
72
73

74
75
76
77

78
79
80
81
82
83



84
85
86
87
88
89
90
91
92
93
94
95
96
97
98







99
100
101
102
103
104
105
106
107







108
109
110
111
112
113
114
58
59
60
61
62
63
64

65
66
67
68
69
70
71

72
73


74
75
76
77

78
79
80
81
82
83

84
85
86
87
88
89
90
91
92
93
94
95
96
97
98

99

100
101
102
103
104
105
106
107
108
109
110
111
112

113

114
115
116
117
118
119
120
121
122
123
124
125
126
127







-
+


+
+
+

-


-
-
+



-
+





-
+
+
+












-

-
+
+
+
+
+
+
+






-

-
+
+
+
+
+
+
+







	if (of_file_stderr == nil)
		of_file_stderr = [[OFFileSingleton alloc]
		    initWithFilePointer: stderr];

	return of_file_stderr;
}

+ (void)changeModeOfFile: (OFString*)path
+ (BOOL)changeModeOfFile: (OFString*)path
		  toMode: (mode_t)mode
{
#ifndef _WIN32
	return (chmod([path cString], mode) == 0 ? YES : NO);
#else
	/*
	 * FIXME: On error, throw exception
	 * FIXME: On Win32, change write access
	 */
#ifndef _WIN32
	chmod([path cString], mode);
	return NO;
#endif
}

+ (void)changeOwnerOfFile: (OFString*)path
+ (BOOL)changeOwnerOfFile: (OFString*)path
		    owner: (uid_t)owner
		    group: (gid_t)group
{
	/* FIXME: On error, throw exception */
#ifndef _WIN32
	chown([path cString], owner, group);
	return (chown([path cString], owner, group) == 0 ? YES : NO);
#else
	return NO;
#endif
}

+ (void)delete: (OFString*)path
{
	/* FIXME: On error, throw exception */
	unlink([path cString]);
}

+ (void)link: (OFString*)src
	  to: (OFString*)dest
{
	/* FIXME: On error, throw exception */
#ifndef _WIN32
	link([src cString], [dest cString]);
	if (link([src cString], [dest cString]) != 0)
		@throw [OFLinkFailedException newWithClass: self
						    source: src
					       destination: dest];
#else
	@throw [OFNotImplementedException newWithClass: self
					      selector: _cmd];
#endif
}

+ (void)symlink: (OFString*)src
	     to: (OFString*)dest
{
	/* FIXME: On error, throw exception */
#ifndef _WIN32
	symlink([src cString], [dest cString]);
	if (symlink([src cString], [dest cString]) != 0)
		@throw [OFSymlinkFailedException newWithClass: self
						       source: src
						  destination: dest];
#else
	@throw [OFNotImplementedException newWithClass: self
					      selector: _cmd];
#endif
}

- init
{
	@throw [OFNotImplementedException newWithClass: isa
					      selector: _cmd];