Qore Programming Language Reference Manual  0.8.7
 All Classes Namespaces Functions Variables Groups Pages
QC_ReadOnlyFile.dox.h
1 
2 namespace Qore {
4 
18 class ReadOnlyFile {
19 
20 public:
22 
35 int close();
36 
37 public:
39 
56  constructor(string path, *string encoding);
57 
58 public:
60 
65  copy();
66 
67 public:
69 
71  destructor();
72 
73 public:
75 
85 string getEncoding();
86 
87 public:
89 
101 *string getFileName();
102 
103 public:
105 
119 int getPos();
120 
121 public:
123 
136 *string getchar();
137 
138 public:
140 
156 hash hstat();
157 
158 public:
160 
177 bool isDataAvailable(timeout timeout_ms = 0);
178 
179 public:
181 
191 bool isOpen();
192 
193 public:
195 
207 bool isTty();
208 
209 public:
211 
237 nothing open(string path, *string encoding);
238 
239 public:
241 
267 *string read(softint size, timeout timeout_ms = -1);
268 
269 public:
271 
297 *binary readBinary(softint size, timeout timeout_ms = -1);
298 
299 public:
301 
326 *string readLine(bool incl_eol = True, *string eol);
327 
328 public:
330 
343 *int readi1();
344 
345 public:
347 
360 *int readi2();
361 
362 public:
364 
377 *int readi2LSB();
378 
379 public:
381 
394 *int readi4();
395 
396 public:
398 
411 *int readi4LSB();
412 
413 public:
415 
428 *int readi8();
429 
430 public:
432 
445 *int readi8LSB();
446 
447 public:
449 
462 *int readu1();
463 
464 public:
466 
479 *int readu2();
480 
481 public:
483 
496 *int readu2LSB();
497 
498 public:
500 
513 *int readu4();
514 
515 public:
517 
530 *int readu4LSB();
531 
532 public:
534 
543 nothing setEncoding(*string encoding);
544 
545 public:
547 
559 nothing setEventQueue(Qore::Thread::Queue queue);
560 
561 public:
563 
572 nothing setEventQueue();
573 
574 public:
576 
589 int setPos(int pos = 0);
590 
591 public:
593 
609 list stat();
610 
611 public:
613 
629 hash statvfs();
630 };
635 
637  const S_IFBLK = S_IFBLK;
639  const S_IFCHR = S_IFCHR;
641  const S_IFDIR = S_IFDIR;
643  const S_IFLNK = S_IFLNK;
645  const S_IFMT = S_IFMT;
647  const S_IFREG = S_IFREG;
651  const S_IFWHT = S_IFWHT;
653  const S_IRGRP = S_IRGRP;
655  const S_IROTH = S_IROTH;
657  const S_IRUSR = S_IRUSR;
659  const S_IRWXG = S_IRWXG;
661  const S_IRWXO = S_IRWXO;
663  const S_IRWXU = S_IRWXU;
665  const S_ISGID = S_ISGID;
667  const S_ISUID = S_ISUID;
669  const S_ISVTX = S_ISVTX;
671  const S_IWGRP = S_IWGRP;
673  const S_IWOTH = S_IWOTH;
675  const S_IWUSR = S_IWUSR;
677  const S_IXGRP = S_IXGRP;
679  const S_IXOTH = S_IXOTH;
681  const S_IXUSR = S_IXUSR;
683 };