\hypertarget{_q_c___file_8dox_8h_source}{}\doxysection{QC\+\_\+\+File.\+dox.\+h}

\begin{DoxyCode}{0}
\DoxyCodeLine{1 }
\DoxyCodeLine{3 \textcolor{keyword}{namespace }\mbox{\hyperlink{namespace_qore}{Qore}} \{}
\DoxyCodeLine{5 }
\DoxyCodeLine{9 \textcolor{keyword}{struct }\mbox{\hyperlink{struct_qore_1_1_pipe_info}{PipeInfo}} \{}
\DoxyCodeLine{11     \mbox{\hyperlink{class_qore_1_1_read_only_file}{ReadOnlyFile}} \mbox{\hyperlink{struct_qore_1_1_pipe_info_ac930bfdae97e32a713d4c7c2a49e8d26}{read}};}
\DoxyCodeLine{13     \mbox{\hyperlink{class_qore_1_1_file}{File}} \mbox{\hyperlink{struct_qore_1_1_pipe_info_a8fc07037893ac5e49581086edc330e67}{write}};}
\DoxyCodeLine{14 \};}
\DoxyCodeLine{15 \}}
\DoxyCodeLine{16 }
\DoxyCodeLine{18 \textcolor{keyword}{namespace }\mbox{\hyperlink{namespace_qore}{Qore}} \{}
\DoxyCodeLine{20 }
\DoxyCodeLine{66 \textcolor{keyword}{class }\mbox{\hyperlink{class_qore_1_1_file}{File}} : \textcolor{keyword}{public} \mbox{\hyperlink{class_qore_1_1_read_only_file}{ReadOnlyFile}} \{}
\DoxyCodeLine{67 }
\DoxyCodeLine{68 \textcolor{keyword}{public}:}
\DoxyCodeLine{70 }
\DoxyCodeLine{85 nothing \mbox{\hyperlink{class_qore_1_1_file_ad8c43bffafd92c6c9f98d2b96f479a58}{chown}}(softint uid, softint gid = -\/1);}
\DoxyCodeLine{86 }
\DoxyCodeLine{87 \textcolor{keyword}{public}:}
\DoxyCodeLine{89 }
\DoxyCodeLine{105  \mbox{\hyperlink{class_qore_1_1_file_a3ebb12df5983eddf42394bce5033aa75}{constructor}}(\_\_7\_ \textcolor{keywordtype}{string} encoding);}
\DoxyCodeLine{106 }
\DoxyCodeLine{107 \textcolor{keyword}{public}:}
\DoxyCodeLine{109 }
\DoxyCodeLine{114  \mbox{\hyperlink{class_qore_1_1_file_accc587603a5e808a19bf9bc2b2956a4a}{copy}}();}
\DoxyCodeLine{115 }
\DoxyCodeLine{116 \textcolor{keyword}{public}:}
\DoxyCodeLine{118 }
\DoxyCodeLine{120  \mbox{\hyperlink{class_qore_1_1_file_a7f26852fbfef444bd2a44c82b8b2cb01}{destructor}}();}
\DoxyCodeLine{121 }
\DoxyCodeLine{122 \textcolor{keyword}{public}:}
\DoxyCodeLine{124 }
\DoxyCodeLine{145 \textcolor{keywordtype}{int} \mbox{\hyperlink{class_qore_1_1_file_a168a65a3e6767edc4b32137a1cd00462}{f\_printf}}(\textcolor{keywordtype}{string} fmt,  ...);}
\DoxyCodeLine{146 }
\DoxyCodeLine{147 \textcolor{keyword}{public}:}
\DoxyCodeLine{149 }
\DoxyCodeLine{154 \textcolor{keywordtype}{int} \mbox{\hyperlink{class_qore_1_1_file_aa0124826c6cc0c6cfa2a81a4612d4844}{f\_printf}}();}
\DoxyCodeLine{155 }
\DoxyCodeLine{156 \textcolor{keyword}{public}:}
\DoxyCodeLine{158 }
\DoxyCodeLine{180 \textcolor{keywordtype}{int} \mbox{\hyperlink{class_qore_1_1_file_a256fede5b478ecd18605a0039f9d82b6}{f\_vprintf}}(\textcolor{keywordtype}{string} fmt, any fmt\_args);}
\DoxyCodeLine{181 }
\DoxyCodeLine{182 \textcolor{keyword}{public}:}
\DoxyCodeLine{184 }
\DoxyCodeLine{189 \textcolor{keywordtype}{int} \mbox{\hyperlink{class_qore_1_1_file_a04172f5443b2e559269849bf7e653219}{f\_vprintf}}();}
\DoxyCodeLine{190 }
\DoxyCodeLine{191 \textcolor{keyword}{public}:}
\DoxyCodeLine{193 }
\DoxyCodeLine{200 \textcolor{keywordtype}{string} \mbox{\hyperlink{class_qore_1_1_file_a5fee3fe037914f2bec02518ac2514ee7}{getCharset}}();}
\DoxyCodeLine{201 }
\DoxyCodeLine{202 \textcolor{keyword}{public}:}
\DoxyCodeLine{204 }
\DoxyCodeLine{227 \mbox{\hyperlink{group__type__conversion__functions_ga2c6a87e3a5b1ab302a1fc6d390754024}{hash}} \mbox{\hyperlink{class_qore_1_1_file_ac32ae5bd28039dadd4daeae6a28c3ef0}{getLockInfo}}();}
\DoxyCodeLine{228 }
\DoxyCodeLine{229 \textcolor{keyword}{public}:}
\DoxyCodeLine{231 }
\DoxyCodeLine{249 nothing \mbox{\hyperlink{class_qore_1_1_file_a28d636b7b8931b499027cd4eef2526ee}{getTerminalAttributes}}(\mbox{\hyperlink{class_qore_1_1_term_i_o_s}{TermIOS}} termios);}
\DoxyCodeLine{250 }
\DoxyCodeLine{251 \textcolor{keyword}{public}:}
\DoxyCodeLine{253 }
\DoxyCodeLine{270 \mbox{\hyperlink{class_qore_1_1_term_i_o_s}{TermIOS}} \mbox{\hyperlink{class_qore_1_1_file_a0a9d380a83dc9e70f143c8ad1f85c7b4}{getTerminalAttributes}}();}
\DoxyCodeLine{271 }
\DoxyCodeLine{272 \textcolor{keyword}{public}:}
\DoxyCodeLine{274 }
\DoxyCodeLine{304 \textcolor{keywordtype}{int} \mbox{\hyperlink{class_qore_1_1_file_ae2ab9eceb9375c60e71b3b3dd46bee0a}{lock}}(softint \mbox{\hyperlink{group__type__conversion__functions_ga181e32c9bc8075431e88bb9bb56285a9}{type}} = \mbox{\hyperlink{group__file__locking__constants_gaf9d120de60979f848d7d145db05c4403}{F\_RDLCK}}, softint start = 0, softint len = 0, softint whence = \mbox{\hyperlink{group__file__seek__constants_gaf3418d7771017bd7551b14aad79900f3}{SEEK\_SET}});}
\DoxyCodeLine{305 }
\DoxyCodeLine{306 \textcolor{keyword}{public}:}
\DoxyCodeLine{308 }
\DoxyCodeLine{336 nothing \mbox{\hyperlink{class_qore_1_1_file_a4ec71933b105ae9b13ef5c84a7b4975a}{lockBlocking}}(softint \mbox{\hyperlink{group__type__conversion__functions_ga181e32c9bc8075431e88bb9bb56285a9}{type}} = \mbox{\hyperlink{group__file__locking__constants_gaf9d120de60979f848d7d145db05c4403}{F\_RDLCK}}, softint start = 0, softint len = 0, softint whence = \mbox{\hyperlink{group__file__seek__constants_gaf3418d7771017bd7551b14aad79900f3}{SEEK\_SET}});}
\DoxyCodeLine{337 }
\DoxyCodeLine{338 \textcolor{keyword}{public}:}
\DoxyCodeLine{340 }
\DoxyCodeLine{367 \textcolor{keywordtype}{int} \mbox{\hyperlink{class_qore_1_1_file_a0f0e402ebce26412fa854b3647a13c15}{open}}(\textcolor{keywordtype}{string} path, softint flags = \mbox{\hyperlink{group__file__open__constants_ga1ab351549a0b39d1492dc0a48d199f64}{O\_RDONLY}}, softint mode = 0666, \_\_7\_ \textcolor{keywordtype}{string} encoding);}
\DoxyCodeLine{368 }
\DoxyCodeLine{369 \textcolor{keyword}{public}:}
\DoxyCodeLine{371 }
\DoxyCodeLine{403 nothing \mbox{\hyperlink{class_qore_1_1_file_acb397de36027a83129823742ac97c157}{open2}}(\textcolor{keywordtype}{string} path, softint flags = \mbox{\hyperlink{group__file__open__constants_ga1ab351549a0b39d1492dc0a48d199f64}{O\_RDONLY}}, softint mode = 0666, \_\_7\_ \textcolor{keywordtype}{string} encoding);}
\DoxyCodeLine{404 }
\DoxyCodeLine{405 \textcolor{keyword}{public}:}
\DoxyCodeLine{407 }
\DoxyCodeLine{427 \textcolor{keywordtype}{int} \mbox{\hyperlink{class_qore_1_1_file_a96b440e3903aa9099cc312ea8c649beb}{print}}(\textcolor{keywordtype}{string} data);}
\DoxyCodeLine{428 }
\DoxyCodeLine{429 \textcolor{keyword}{public}:}
\DoxyCodeLine{431 }
\DoxyCodeLine{452 \textcolor{keywordtype}{int} \mbox{\hyperlink{class_qore_1_1_file_a3de02cd9abd35f71dd3d1f24f8ee3af1}{printf}}(\textcolor{keywordtype}{string} fmt,  ...);}
\DoxyCodeLine{453 }
\DoxyCodeLine{454 \textcolor{keyword}{public}:}
\DoxyCodeLine{456 }
\DoxyCodeLine{461 \textcolor{keywordtype}{int} \mbox{\hyperlink{class_qore_1_1_file_a7fb81ceed3597d9424e9bbd5dd2e55c0}{printf}}();}
\DoxyCodeLine{462 }
\DoxyCodeLine{463 \textcolor{keyword}{public}:}
\DoxyCodeLine{465 }
\DoxyCodeLine{484 nothing \mbox{\hyperlink{class_qore_1_1_file_a8ce1cf401892b56a61bbb16754366079}{redirect}}(\mbox{\hyperlink{class_qore_1_1_file}{Qore::File}} file);}
\DoxyCodeLine{485 }
\DoxyCodeLine{486 \textcolor{keyword}{public}:}
\DoxyCodeLine{488 }
\DoxyCodeLine{493 nothing \mbox{\hyperlink{class_qore_1_1_file_a91953edb4d6d768fb72ee73f7c4dd04d}{setCharset}}(\_\_7\_ \textcolor{keywordtype}{string} encoding);}
\DoxyCodeLine{494 }
\DoxyCodeLine{495 \textcolor{keyword}{public}:}
\DoxyCodeLine{497 }
\DoxyCodeLine{534 nothing \mbox{\hyperlink{class_qore_1_1_file_aa1d7a62aa8f383cad5b8bdee78c350dd}{setTerminalAttributes}}(softint action = \mbox{\hyperlink{group__tattr__term__setting__constants_ga1e9c9ecc5ab9180c3665ba2115c792a0}{TCSANOW}}, \mbox{\hyperlink{class_qore_1_1_term_i_o_s}{TermIOS}} termios);}
\DoxyCodeLine{535 }
\DoxyCodeLine{536 \textcolor{keyword}{public}:}
\DoxyCodeLine{538 }
\DoxyCodeLine{548 \textcolor{keywordtype}{int} \mbox{\hyperlink{class_qore_1_1_file_a05a4b62c74f2424fff8bb6446f1c8eff}{sync}}();}
\DoxyCodeLine{549 }
\DoxyCodeLine{550 \textcolor{keyword}{public}:}
\DoxyCodeLine{552 }
\DoxyCodeLine{574 \textcolor{keywordtype}{int} \mbox{\hyperlink{class_qore_1_1_file_a3aaa41c4e29e2589c4dc122b749308ef}{vprintf}}(\textcolor{keywordtype}{string} fmt, any fmt\_args);}
\DoxyCodeLine{575 }
\DoxyCodeLine{576 \textcolor{keyword}{public}:}
\DoxyCodeLine{578 }
\DoxyCodeLine{583 \textcolor{keywordtype}{int} \mbox{\hyperlink{class_qore_1_1_file_a8e508aabefedf9fa70c42d0e5fab5959}{vprintf}}();}
\DoxyCodeLine{584 }
\DoxyCodeLine{585 \textcolor{keyword}{public}:}
\DoxyCodeLine{587 }
\DoxyCodeLine{604 \textcolor{keywordtype}{int} \mbox{\hyperlink{class_qore_1_1_file_acd30e6f14435bae0393b1ed52bec502d}{write}}(\mbox{\hyperlink{group__type__conversion__functions_gaf11c7f5c43ced1e9b95bd2270ee87ed9}{binary}} data);}
\DoxyCodeLine{605 }
\DoxyCodeLine{606 \textcolor{keyword}{public}:}
\DoxyCodeLine{608 }
\DoxyCodeLine{628 \textcolor{keywordtype}{int} \mbox{\hyperlink{class_qore_1_1_file_a34282b14e6bafab669b452e8b0fbacd6}{write}}(\textcolor{keywordtype}{string} data);}
\DoxyCodeLine{629 }
\DoxyCodeLine{630 \textcolor{keyword}{public}:}
\DoxyCodeLine{632 }
\DoxyCodeLine{649 \textcolor{keywordtype}{int} \mbox{\hyperlink{class_qore_1_1_file_ad4f67c2a247f4b7fb9c6e26b51106aba}{writei1}}(\textcolor{keywordtype}{int} c);}
\DoxyCodeLine{650 }
\DoxyCodeLine{651 \textcolor{keyword}{public}:}
\DoxyCodeLine{653 }
\DoxyCodeLine{670 \textcolor{keywordtype}{int} \mbox{\hyperlink{class_qore_1_1_file_adcf79ce346b63b85ff517580fd96d0b0}{writei2}}(\textcolor{keywordtype}{int} s);}
\DoxyCodeLine{671 }
\DoxyCodeLine{672 \textcolor{keyword}{public}:}
\DoxyCodeLine{674 }
\DoxyCodeLine{691 \textcolor{keywordtype}{int} \mbox{\hyperlink{class_qore_1_1_file_a9004f5ff77ea368263121c33f95c87c5}{writei2LSB}}(\textcolor{keywordtype}{int} s);}
\DoxyCodeLine{692 }
\DoxyCodeLine{693 \textcolor{keyword}{public}:}
\DoxyCodeLine{695 }
\DoxyCodeLine{712 \textcolor{keywordtype}{int} \mbox{\hyperlink{class_qore_1_1_file_a82dee19cad26e011ba1a0970d42b2130}{writei4}}(\textcolor{keywordtype}{int} i);}
\DoxyCodeLine{713 }
\DoxyCodeLine{714 \textcolor{keyword}{public}:}
\DoxyCodeLine{716 }
\DoxyCodeLine{733 \textcolor{keywordtype}{int} \mbox{\hyperlink{class_qore_1_1_file_a6788f0f1bd5b015dd726a6b2d06077bf}{writei4LSB}}(\textcolor{keywordtype}{int} i);}
\DoxyCodeLine{734 }
\DoxyCodeLine{735 \textcolor{keyword}{public}:}
\DoxyCodeLine{737 }
\DoxyCodeLine{754 \textcolor{keywordtype}{int} \mbox{\hyperlink{class_qore_1_1_file_a9de545742fe95945677bb3049a1900fc}{writei8}}(\textcolor{keywordtype}{int} i);}
\DoxyCodeLine{755 }
\DoxyCodeLine{756 \textcolor{keyword}{public}:}
\DoxyCodeLine{758 }
\DoxyCodeLine{775 \textcolor{keywordtype}{int} \mbox{\hyperlink{class_qore_1_1_file_aab6932b3995a5b0963e41ef41bdd0b36}{writei8LSB}}(\textcolor{keywordtype}{int} i);}
\DoxyCodeLine{776 }
\DoxyCodeLine{777 \textcolor{keyword}{public}:}
\DoxyCodeLine{779 }
\DoxyCodeLine{785 \textcolor{keyword}{static} hash<PipeInfo> \mbox{\hyperlink{class_qore_1_1_file_aafefd976678d3e56c2272d942efde30b}{getPipe}}();}
\DoxyCodeLine{786 \};}
\DoxyCodeLine{791 }
\DoxyCodeLine{793     \textcolor{keyword}{const} \mbox{\hyperlink{group__file__open__constants_ga8e48617453f7fd321bcceee8816bf23d}{O\_ACCMODE}} = \mbox{\hyperlink{group__file__open__constants_ga8e48617453f7fd321bcceee8816bf23d}{O\_ACCMODE}};}
\DoxyCodeLine{795     \textcolor{keyword}{const} \mbox{\hyperlink{group__file__open__constants_gab47c6691139c37e08761a808d16ede1d}{O\_APPEND}} = \mbox{\hyperlink{group__file__open__constants_gab47c6691139c37e08761a808d16ede1d}{O\_APPEND}};}
\DoxyCodeLine{797     \textcolor{keyword}{const} \mbox{\hyperlink{group__file__open__constants_ga9af988b09d302ec0ae8605d5610e1e9a}{O\_CREAT}} = \mbox{\hyperlink{group__file__open__constants_ga9af988b09d302ec0ae8605d5610e1e9a}{O\_CREAT}};}
\DoxyCodeLine{799     \textcolor{keyword}{const} \mbox{\hyperlink{group__file__open__constants_ga682b263ef12018bfd33ca8ba8bc8fd16}{O\_DIRECT}} = \mbox{\hyperlink{group__file__open__constants_ga682b263ef12018bfd33ca8ba8bc8fd16}{O\_DIRECT}};}
\DoxyCodeLine{801     \textcolor{keyword}{const} \mbox{\hyperlink{group__file__open__constants_ga5be496ec4bdff357baf0e742139c74b1}{O\_DIRECTORY}} = \mbox{\hyperlink{group__file__open__constants_ga5be496ec4bdff357baf0e742139c74b1}{O\_DIRECTORY}};}
\DoxyCodeLine{803     \textcolor{keyword}{const} \mbox{\hyperlink{group__file__open__constants_ga4ba47557022312d11d81f171fbb2e9ba}{O\_EXCL}} = \mbox{\hyperlink{group__file__open__constants_ga4ba47557022312d11d81f171fbb2e9ba}{O\_EXCL}};}
\DoxyCodeLine{805     \textcolor{keyword}{const} \mbox{\hyperlink{group__file__open__constants_gaef24f5eb3bd3bd4dd9d4658577376715}{O\_NDELAY}} = \mbox{\hyperlink{group__file__open__constants_gaef24f5eb3bd3bd4dd9d4658577376715}{O\_NDELAY}};}
\DoxyCodeLine{807     \textcolor{keyword}{const} \mbox{\hyperlink{group__file__open__constants_ga107ba322507fc52fe0c4a6537ded406a}{O\_NOCTTY}} = \mbox{\hyperlink{group__file__open__constants_ga107ba322507fc52fe0c4a6537ded406a}{O\_NOCTTY}};}
\DoxyCodeLine{809     \textcolor{keyword}{const} \mbox{\hyperlink{group__file__open__constants_ga3452d00ede9696d75d1062d95da9449a}{O\_NOFOLLOW}} = \mbox{\hyperlink{group__file__open__constants_ga3452d00ede9696d75d1062d95da9449a}{O\_NOFOLLOW}};}
\DoxyCodeLine{811     \textcolor{keyword}{const} \mbox{\hyperlink{group__file__open__constants_gad5c43d9d32ea2b08ebbdfe70aa84710a}{O\_NONBLOCK}} = \mbox{\hyperlink{group__file__open__constants_gad5c43d9d32ea2b08ebbdfe70aa84710a}{O\_NONBLOCK}};}
\DoxyCodeLine{813     \textcolor{keyword}{const} \mbox{\hyperlink{group__file__open__constants_ga1ab351549a0b39d1492dc0a48d199f64}{O\_RDONLY}} = \mbox{\hyperlink{group__file__open__constants_ga1ab351549a0b39d1492dc0a48d199f64}{O\_RDONLY}};}
\DoxyCodeLine{815     \textcolor{keyword}{const} \mbox{\hyperlink{group__file__open__constants_ga0d2a9837762a26e27fb666fa44358c37}{O\_RDWR}} = \mbox{\hyperlink{group__file__open__constants_ga0d2a9837762a26e27fb666fa44358c37}{O\_RDWR}};}
\DoxyCodeLine{817     \textcolor{keyword}{const} \mbox{\hyperlink{group__file__open__constants_gacb2f3e1944dae38a5c4363ba21bbca11}{O\_SYNC}} = \mbox{\hyperlink{group__file__open__constants_gacb2f3e1944dae38a5c4363ba21bbca11}{O\_SYNC}};}
\DoxyCodeLine{819     \textcolor{keyword}{const} \mbox{\hyperlink{group__file__open__constants_gaeee59f4f7458e6d022dc84da0b9817af}{O\_TRUNC}} = \mbox{\hyperlink{group__file__open__constants_gaeee59f4f7458e6d022dc84da0b9817af}{O\_TRUNC}};}
\DoxyCodeLine{821     \textcolor{keyword}{const} \mbox{\hyperlink{group__file__open__constants_ga24d94df00b8914ad6459e39cddfe15bf}{O\_WRONLY}} = \mbox{\hyperlink{group__file__open__constants_ga24d94df00b8914ad6459e39cddfe15bf}{O\_WRONLY}};}
\DoxyCodeLine{823 }
\DoxyCodeLine{829 }
\DoxyCodeLine{831     \textcolor{keyword}{const} \mbox{\hyperlink{group__file__locking__constants_gaf9d120de60979f848d7d145db05c4403}{F\_RDLCK}} = \mbox{\hyperlink{group__file__locking__constants_gaf9d120de60979f848d7d145db05c4403}{F\_RDLCK}};}
\DoxyCodeLine{833     \textcolor{keyword}{const} \mbox{\hyperlink{group__file__locking__constants_ga6a9776b4f6e4e751d2ad8011979072c4}{F\_UNLCK}} = \mbox{\hyperlink{group__file__locking__constants_ga6a9776b4f6e4e751d2ad8011979072c4}{F\_UNLCK}};}
\DoxyCodeLine{835     \textcolor{keyword}{const} \mbox{\hyperlink{group__file__locking__constants_ga6df55e6d2cd8d49cb714afe15f4d6b63}{F\_WRLCK}} = \mbox{\hyperlink{group__file__locking__constants_ga6df55e6d2cd8d49cb714afe15f4d6b63}{F\_WRLCK}};}
\DoxyCodeLine{837 }
\DoxyCodeLine{841 }
\DoxyCodeLine{843     \textcolor{keyword}{const} \mbox{\hyperlink{group__file__seek__constants_gafb10f9061ee15381748299f4148b5839}{SEEK\_CUR}} = \mbox{\hyperlink{group__file__seek__constants_gafb10f9061ee15381748299f4148b5839}{SEEK\_CUR}};}
\DoxyCodeLine{845     \textcolor{keyword}{const} \mbox{\hyperlink{group__file__seek__constants_ga1201b62b1ac5ac95f7890d2be610e103}{SEEK\_END}} = \mbox{\hyperlink{group__file__seek__constants_ga1201b62b1ac5ac95f7890d2be610e103}{SEEK\_END}};}
\DoxyCodeLine{847     \textcolor{keyword}{const} \mbox{\hyperlink{group__file__seek__constants_gaf3418d7771017bd7551b14aad79900f3}{SEEK\_SET}} = \mbox{\hyperlink{group__file__seek__constants_gaf3418d7771017bd7551b14aad79900f3}{SEEK\_SET}};}
\DoxyCodeLine{849 \}}

\end{DoxyCode}
