summaryrefslogtreecommitdiff
path: root/src/lib/ecore/efl_io_file.eo
blob: c0b48c381d2fe05c6b094e343676aed1d4935db0 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
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
class Efl.Io.File extends Efl.Loop_Fd implements Efl.File, Efl.Io.Reader_Fd, Efl.Io.Writer_Fd, Efl.Io.Closer_Fd, Efl.Io.Sizer_Fd, Efl.Io.Positioner_Fd {
    [[File access (open, close, read, write, lseek, ftruncate)

      @Efl.Io.Closer.close_on_exec and
      @Efl.Io.Closer.close_on_invalidate are respected and default to
      $true. @Efl.Io.Closer.close_on_exec.set sets flag O_CLOEXEC.

      @since 1.19
    ]]

    methods {
        @property flags {
            [[Bitwise OR'ed flags to open the file, like O_CREAT, O_APPEND...

              Defaults to O_RDONLY | O_CLOEXEC.

              The flag O_CLOEXEC will be also managed by
              @Efl.Io.Closer.close_on_exec.set. Setting the property
              after the file is opened will change its blocking
              behavior.
            ]]
            get {
            }

            set {
               [[Constructor property to define flags to open the file]]
            }

            values {
                flags: uint32; [[Flags to open file, see man:open(2).]]
            }
        }

        @property mode {
            [[Mode property]]
            get {
            }

            set {
               [[Constructor property to define mode to open the file]]
            }

            values {
                mode: uint32; [[Mode to open file, see man:open(2).]]
            }
        }
    }

    implements {
        Efl.Object.constructor;
        Efl.Object.destructor;
        Efl.Object.finalize;
        Efl.Loop_Fd.fd_file { set; }
        Efl.File.file { get; set; }
        Efl.Io.Reader.read;
        Efl.Io.Writer.write;
        Efl.Io.Closer.close;
        Efl.Io.Closer.close_on_exec { set; }
        Efl.Io.Sizer.resize;
        Efl.Io.Positioner.seek;
    }
}