10
11
12
13
14
15
16
17
18
19
20
21
22
23
|
*/
#include <sys/types.h>
#import "OFSeekableStream.h"
@class OFString;
/**
* \brief A class which provides functions to read, write and manipulate files.
*/
@interface OFFile: OFSeekableStream
{
int fd;
|
>
|
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
|
*/
#include <sys/types.h>
#import "OFSeekableStream.h"
@class OFString;
@class OFArray;
/**
* \brief A class which provides functions to read, write and manipulate files.
*/
@interface OFFile: OFSeekableStream
{
int fd;
|
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
|
* \param fd A file descriptor, returned from for example open().
* It is not closed when the OFFile object is deallocated!
* \return A new autoreleased OFFile
*/
+ fileWithFileDescriptor: (int)fd;
/**
* \return A boolean whether there is a file at the specified path
*/
+ (BOOL)fileExistsAtPath: (OFString*)path;
/**
* Changes the mode of a file.
*
* Only changes read-only flag on Windows.
*
* \param path The path to the file of which the mode should be changed as a
* string
|
>
>
>
>
>
>
>
>
>
>
>
>
>
|
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
|
* \param fd A file descriptor, returned from for example open().
* It is not closed when the OFFile object is deallocated!
* \return A new autoreleased OFFile
*/
+ fileWithFileDescriptor: (int)fd;
/**
* \param path The path to check
* \return A boolean whether there is a file at the specified path
*/
+ (BOOL)fileExistsAtPath: (OFString*)path;
/**
* \param path The path to check
* \return A boolean whether there is a directory at the specified path
*/
+ (BOOL)directoryExistsAtPath: (OFString*)path;
/**
* \param path The path of the directory
* \return An array of OFStrings with the files at the specified path
*/
+ (OFArray*)filesInDirectoryAtPath: (OFString*)path;
/**
* Changes the mode of a file.
*
* Only changes read-only flag on Windows.
*
* \param path The path to the file of which the mode should be changed as a
* string
|