ronnie
2022-10-14 1504bb53e29d3d46222c0b3ea994fc494b48e153
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
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
M\¬Qc@sfdZddlZejdedƒdd d„ƒYZddd„Zd    „Zd
Zd ZdZ    dS( s:Extended file operations available in POSIX.
 
f = posixfile.open(filename, [mode, [bufsize]])
      will create a new posixfile object
 
f = posixfile.fileopen(fileobject)
      will create a posixfile object from a builtin file object
 
f.file()
      will return the original builtin file object
 
f.dup()
      will return a new file object based on a new filedescriptor
 
f.dup2(fd)
      will return a new file object based on the given filedescriptor
 
f.flags(mode)
      will turn on the associated flag (merge)
      mode can contain the following characters:
 
  (character representing a flag)
      a       append only flag
      c       close on exec flag
      n       no delay flag
      s       synchronization flag
  (modifiers)
      !       turn flags 'off' instead of default 'on'
      =       copy flags 'as is' instead of default 'merge'
      ?       return a string in which the characters represent the flags
              that are set
 
      note: - the '!' and '=' modifiers are mutually exclusive.
            - the '?' modifier will return the status of the flags after they
              have been changed by other characters in the mode string
 
f.lock(mode [, len [, start [, whence]]])
      will (un)lock a region
      mode can contain the following characters:
 
  (character representing type of lock)
      u       unlock
      r       read lock
      w       write lock
  (modifiers)
      |       wait until the lock can be granted
      ?       return the first lock conflicting with the requested lock
              or 'None' if there is no conflict. The lock returned is in the
              format (mode, len, start, whence, pid) where mode is a
              character representing the type of lock ('r' or 'w')
 
      note: - the '?' modifier prevents a region from being locked; it is
              query only
iÿÿÿÿNsIThe posixfile module is deprecated; fcntl.lockf() provides better lockingit _posixfile_cBsheZdZddgZd„Zddd„Zd„Zd„Zd    „Zd
„Z    d „Z
d „Z RS( s;File wrapper class that provides extra POSIX file routines.topentclosedcCs=|j}d|j|j|j|jtt|ƒƒdfS(Ns$<%s posixfile '%s', mode '%s' at %s>i(t_file_tstatesRtnametmodethextid(tselftfile((sQ/tmp/ndk-User/buildhost/install/prebuilt/darwin-x86_64/lib/python2.7/posixfile.pyt__repr__Cs    triÿÿÿÿcCs(ddl}|j|j|||ƒƒS(Niÿÿÿÿ(t __builtin__tfileopenR(R    RRtbufsizeR ((sQ/tmp/ndk-User/buildhost/install/prebuilt/darwin-x86_64/lib/python2.7/posixfile.pyRLs cCsšddl}tt|ƒƒdkr0td‚n||_xZt|ƒD]L}|jdƒsFt||ƒ}t||j    ƒr’t
|||ƒq’qFqFW|S(Niÿÿÿÿs <type 'file'>s,posixfile.fileopen() arg must be file objectt_( ttypestreprttypet    TypeErrorRtdirt
startswithtgetattrt
isinstancetBuiltinMethodTypetsetattr(R    R
Rt maybemethodtattr((sQ/tmp/ndk-User/buildhost/install/prebuilt/darwin-x86_64/lib/python2.7/posixfile.pyRPs      cCs|jS(N(R(R    ((sQ/tmp/ndk-User/buildhost/install/prebuilt/darwin-x86_64/lib/python2.7/posixfile.pyR
`scCsOddl}t|dƒs'td‚n|j|j|jjƒƒ|jjƒS(Niÿÿÿÿtfdopensdup() method unavailable(tposixthasattrtAttributeErrorRtdupRtfilenoR(R    R((sQ/tmp/ndk-User/buildhost/install/prebuilt/darwin-x86_64/lib/python2.7/posixfile.pyR!cs  cCsVddl}t|dƒs'td‚n|j|jjƒ|ƒ|j||jjƒS(NiÿÿÿÿRsdup() method unavailable(RRR tdup2RR"RR(R    tfdR((sQ/tmp/ndk-User/buildhost/install/prebuilt/darwin-x86_64/lib/python2.7/posixfile.pyR#ks
  cGsddl}ddl}|rIt|ƒdkr<td‚n|d}nd}d}d|krq||jB}nd|kr||jB}nd|kr©||jB}n|j}d    |kr|j|jƒ|j    dƒ}d
|krö||@}q||B}n|j|jƒ|j
|ƒ}d |krZd
|k}|j|jƒ|j |ƒ}nd|kr d }|j|jƒ|j    dƒ}|j|@r¤|d}n|j|jƒ|j dƒd@rÓ|d }n|j|@rí|d}n|j|@r|d}n|SdS( NiÿÿÿÿisToo many argumentsit?tntatst=t!tct( tfcntltostlenRtO_NDELAYtO_APPENDtO_SYNCRR"tF_GETFLtF_SETFLtF_SETFDtF_GETFD(R    twhichR-R.tl_flagsR
tcur_fltarg((sQ/tmp/ndk-User/buildhost/install/prebuilt/darwin-x86_64/lib/python2.7/posixfile.pytflagstsF              !  "   c Gsddl}ddl}d|kr0|j}n9d|krH|j}n!d|kr`|j}n    td‚d|kr|j}n!d|kr™|j}n    |j}d}d}d}    t    |ƒd    krÓ|d}    nct    |ƒd
krô|\}    }nBt    |ƒd kr|\}    }}nt    |ƒd kr6td ‚nddl
}
ddl } |
j dkr„|j d||    | jƒ||ƒ} nW|
j d krº|j d||||    dddƒ} n!|j d||||    ddƒ} |j|jjƒ|| ƒ} d|kr|
j d!kr8|jd| ƒ\}}    } }}n“|
j d"krq|jd| ƒ\}}}}    }} }nZ|
j dkr§|jd| ƒ\}}}}    } }n$|jd| ƒ\}}}}    }} ||jkr||jkrüd|    ||| fSd|    ||| fSqndS(#NiÿÿÿÿtwR tusno type of lock specifiedt|R%iiiistoo many argumentstnetbsd1topenbsd2tfreebsd2tfreebsd3tfreebsd4tfreebsd5tfreebsd6tfreebsd7tfreebsd8tbsdos2tbsdos3tbsdos4t lxxxxlxxxxlhhtaix3taix4thhllliithhllhhtlinux2( R?R@RARBRCRDRERFRGRHRIRJ(RLRM(    R?R@RARBRCRDRHRIRJ(RLRM(tstructR-tF_WRLCKtF_RDLCKtF_UNLCKRtF_SETLKWtF_GETLKtF_SETLKR/tsysR.tplatformtpacktgetpidRR"tunpack(R    thowtargsRQR-tl_typetcmdtl_whencetl_starttl_lenRXR.tflocktl_pidtl_sysidtl_vfs((sQ/tmp/ndk-User/buildhost/install/prebuilt/darwin-x86_64/lib/python2.7/posixfile.pytlock™sj                                    $*'$( t__name__t
__module__t__doc__RR RRR
R!R#R;Rh(((sQ/tmp/ndk-User/buildhost/install/prebuilt/darwin-x86_64/lib/python2.7/posixfile.pyR;s                                 %R cCstƒj|||ƒS(s4Public routine to open a file as a posixfile object.(RR(RRR((sQ/tmp/ndk-User/buildhost/install/prebuilt/darwin-x86_64/lib/python2.7/posixfile.pyRÜscCstƒj|ƒS(sCPublic routine to get a posixfile object from a Python file object.(RR(R
((sQ/tmp/ndk-User/buildhost/install/prebuilt/darwin-x86_64/lib/python2.7/posixfile.pyRàsii((
RktwarningstwarntDeprecationWarningRRRtSEEK_SETtSEEK_CURtSEEK_END(((sQ/tmp/ndk-User/buildhost/install/prebuilt/darwin-x86_64/lib/python2.7/posixfile.pyt<module>6s     
¡