ObjFW  Diff

Differences From Artifact [997d7c3607]:

To Artifact [501618be41]:


1
2
3
4
5
6
7
8
9
10
11
12

13
14
15
16
17
18
19
1
2
3
4
5
6
7
8
9
10
11

12
13
14
15
16
17
18
19











-
+







/*
 * Copyright (c) 2008 - 2010
 *   Jonathan Schleifer <js@webkeks.org>
 *
 * All rights reserved.
 *
 * This file is part of ObjFW. It may be distributed under the terms of the
 * Q Public License 1.0, which can be found in the file LICENSE included in
 * the packaging of this file.
 */

#include <sys/stat.h>
#include <sys/types.h>

#import "OFObject.h"

@class OFString;

/**
 * \brief An exception indicating an object could not be allocated.
490
491
492
493
494
495
496
497
498


499
500
501
502
503
504
505


506
507
508
509
510
511
512
513
514
515
516
517
518
519


520
521
522
523
524
525
526
527
528
529
530
531
532
533


534
535
536
537
538
539
540
541
542
543
544
545
546
547
548

549
550
551
552
553

554
555
556
557
558
559
560
490
491
492
493
494
495
496


497
498
499
500
501
502
503


504
505
506
507
508
509
510
511
512
513
514
515
516
517


518
519
520
521
522
523
524
525
526
527
528
529
530
531


532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547

548
549
550
551
552

553
554
555
556
557
558
559
560







-
-
+
+





-
-
+
+












-
-
+
+












-
-
+
+














-
+




-
+







#ifndef _WIN32
/**
 * \brief An exception indicating that changing the owner of a file failed.
 */
@interface OFChangeFileOwnerFailedException: OFException
{
	OFString *path;
	uid_t owner;
	gid_t group;
	OFString *owner;
	OFString *group;
	int errNo;
}

#ifdef OF_HAVE_PROPERTIES
@property (readonly, nonatomic) OFString *path;
@property (readonly) uid_t owner;
@property (readonly) gid_t group;
@property (readonly, nonatomic) OFString *owner;
@property (readonly, nonatomic) OFString *group;
@property (readonly) int errNo;
#endif

/**
 * \param class_ The class of the object which caused the exception
 * \param path The path of the file
 * \param owner The new owner for the file
 * \param group The new group for the file
 * \return An initialized change file owner failed exception
 */
+ newWithClass: (Class)class_
	  path: (OFString*)path
	 owner: (uid_t)owner
	 group: (gid_t)group;
	 owner: (OFString*)owner
	 group: (OFString*)group;

/**
 * Initializes an already allocated change file owner failed exception.
 *
 * \param class_ The class of the object which caused the exception
 * \param path The path of the file
 * \param owner The new owner for the file
 * \param group The new group for the file
 * \return An initialized change file owner failed exception
 */
- initWithClass: (Class)class_
	   path: (OFString*)path
	  owner: (uid_t)owner
	  group: (gid_t)group;
	  owner: (OFString*)owner
	  group: (OFString*)group;

/**
 * \return The errno from when the exception was created
 */
- (int)errNo;

/**
 * \return The path of the file
 */
- (OFString*)path;

/**
 * \return The new owner for the file
 */
- (uid_t)owner;
- (OFString*)owner;

/**
 * \return The new group for the file
 */
- (gid_t)group;
- (OFString*)group;
@end
#endif

/**
 * \brief An exception indicating that copying a file failed.
 */
@interface OFCopyFileFailedException: OFException