85nothing
chown(softint uid, softint gid = -1);
367int open(
string path, softint flags =
O_RDONLY, softint mode = 0666, *
string encoding);
403nothing
open2(
string path, softint flags =
O_RDONLY, softint mode = 0666, *
string encoding);
The File class allows Qore programs to read, write, and create files.
Definition: QC_File.dox.h:66
int f_vprintf()
This method variant does nothing except return a constant 0; it is only included for backwards-compat...
int sync()
Flushes the file's buffer to disk.
TermIOS getTerminalAttributes()
Returns the current terminal attributes for the file as a TermIOS object returned as the return value...
int open(string path, softint flags=O_RDONLY, softint mode=0666, *string encoding)
Opens a File in a particular mode, returns an error code on failure.
int f_printf(string fmt,...)
Writes a formatted string with hard field widths to the file.
int f_vprintf(string fmt, any fmt_args)
Writes a formatted string with hard field widths to a file, where the second argument is the formatti...
nothing getTerminalAttributes(TermIOS termios)
Saves the current terminal attributes for the file in the TermIOS object passed; changes the object p...
int write(string data)
Writes string data to a file; string data is converted to the File's character encoding if necessary ...
int vprintf(string fmt, any fmt_args)
Writes a formatted string with soft field widths to a file, where the second argument is the formatti...
int printf(string fmt,...)
Writes a formatted string with soft field widths to the file.
constructor(*string encoding)
Creates the File object.
nothing lockBlocking(softint type=F_RDLCK, softint start=0, softint len=0, softint whence=SEEK_SET)
Attempts to lock the file according to the arguments passed, blocking.
string getCharset()
Returns the character encoding for the File.
int writei4LSB(int i)
Writes a 4-byte (32 bit) integer to the file in binary little-endian format.
destructor()
Closes the File if it is open and destroys the File object.
int printf()
This method variant does nothing except return a constant 0; it is only included for backwards-compat...
int writei4(int i)
Writes a 4-byte (32 bit) integer to the file in binary big-endian format.
nothing redirect(Qore::File file)
redirects an existing file to another file
int vprintf()
This method variant does nothing except return a constant 0; it is only included for backwards-compat...
int writei2LSB(int s)
Writes a 2-byte (16 bit) integer to the file in binary little-endian format.
nothing setCharset(*string encoding)
Sets the character encoding for the file; if called with no argument, the default encoding is set.
int print(string data)
Writes string data to a file; string data is converted to the File's character encoding if necessary ...
int writei8(int i)
Writes an 8-byte (64 bit) integer to the file in binary big-endian format.
int f_printf()
This method variant does nothing except return a constant 0; it is only included for backwards-compat...
nothing setTerminalAttributes(softint action=TCSANOW, TermIOS termios)
Sets the current terminal attributes for the File from the TermIOS object passed; does not change the...
int writei8LSB(int i)
Writes an 8-byte (64 bit) integer to the file in binary little-endian format.
static hash< PipeInfo > getPipe()
Returns a hash with read and write files on an internal FIFO pipe.
hash getLockInfo()
Returns a hash of lock information.
nothing open2(string path, softint flags=O_RDONLY, softint mode=0666, *string encoding)
Opens a file in a particular mode; throws an exception on failure.
copy()
Creates a new File object with the same character encoding specification as the original,...
int write(binary data)
Writes binary data to a file.
int writei1(int c)
Writes a 1-byte integer to the file.
nothing chown(softint uid, softint gid=-1)
Changes the user and group owners of the file on the filesystem (if the current user has sufficient p...
int writei2(int s)
Writes a 2-byte (16 bit) integer to the file in binary big-endian format.
int lock(softint type=F_RDLCK, softint start=0, softint len=0, softint whence=SEEK_SET)
Attempts to lock the file according to the arguments passed, does not block.
The ReadOnlyFile class allows Qore programs to read existing files.
Definition: QC_ReadOnlyFile.dox.h:23
This class allows Qore scripts to get or set terminal settings on UNIX platforms.
Definition: QC_TermIOS.dox.h:45
const F_UNLCK
Use for unlocking a lock.
Definition: QC_File.dox.h:833
const F_WRLCK
Use for exclusive write locking.
Definition: QC_File.dox.h:835
const F_RDLCK
Use for read-only locking.
Definition: QC_File.dox.h:831
const O_RDWR
Open for reading and writing.
Definition: QC_File.dox.h:815
const O_NOCTTY
don't allocate controlling tty (0 on platforms where this is not available)
Definition: QC_File.dox.h:807
const O_RDONLY
Open the file read-only.
Definition: QC_File.dox.h:813
const O_WRONLY
Open the file write-only.
Definition: QC_File.dox.h:821
const O_NOFOLLOW
don't follow links (0 on platforms where this is not available)
Definition: QC_File.dox.h:809
const O_EXCL
Raise an error if used with O_CREAT and the file exists.
Definition: QC_File.dox.h:803
const O_DIRECTORY
must be a directory (0 on platforms where this is not available)
Definition: QC_File.dox.h:801
const O_DIRECT
direct disk access hint (0 on platforms where this is not available)
Definition: QC_File.dox.h:799
const O_ACCMODE
Mask for access modes (O_RDONLY|O_WRONLY|O_RDWR)
Definition: QC_File.dox.h:793
const O_CREAT
Create the file if it doesn't exist.
Definition: QC_File.dox.h:797
const O_APPEND
Open the file in append mode (append on each write)
Definition: QC_File.dox.h:795
const O_SYNC
synchronized file update option (0 on platforms where this is not available)
Definition: QC_File.dox.h:817
const O_NONBLOCK
non-blocking I/O (untested with Qore; 0 on platforms where this is not available)
Definition: QC_File.dox.h:811
const O_TRUNC
Truncate the size to zero.
Definition: QC_File.dox.h:819
const O_NDELAY
synonym for O_NONBLOCK (untested with Qore; 0 on platforms where this is not available)
Definition: QC_File.dox.h:805
const SEEK_END
Indicates that the offset is from the end of the file.
Definition: QC_File.dox.h:845
const SEEK_SET
Indicates that the offset is from the start of the file.
Definition: QC_File.dox.h:847
const SEEK_CUR
Indicates that the offset is from the current position in the file.
Definition: QC_File.dox.h:843
const TCSANOW
make change immediate
Definition: QC_TermIOS.dox.h:472
string type(auto arg)
Returns a string giving the data type of the argument passed; see String Type Constants for the value...
hash< auto > hash()
Always returns the same hash passed.
binary binary()
Always returns an empty binary object (of zero length)
Qore namespace.
Definition: QC_AbstractSmartLock.dox.h:2
Pipe info hash description.
Definition: QC_File.dox.h:9
File write
Write end of the pipe.
Definition: QC_File.dox.h:13
ReadOnlyFile read
Read end of the pipe.
Definition: QC_File.dox.h:11