C++ counterparts of SPL native functions that deal with file operations. More...
C++ counterparts of SPL native functions that deal with file operations.
|
inline |
Create a directory
name | Directory name. This must be a fully qualified name. You may use builtin functions like dataDirectory to construct the fully qualified name. |
mode | The permissions to be set on the new directory. This should have the equivalent values that would be passed to the C mkdir function. |
err | Set to 0 on success, errno value on failure. |
|
inline |
|
inline |
|
inline |
Open a file.
filename | File to open. This must be a fully qualified name. You may use builtin functions like dataDirectory to construct the fully qualified name. |
mode | How the file is to be used (for reading, writing, etc). |
err | Set to 0 on success, errno value on failure. |
|
inline |
Open a file.
filename | File to open. This must be a fully qualified name. You may use builtin functions like dataDirectory to construct the fully qualified name. |
mode | How the file is to be used (for reading, writing, etc). |
err | Error, if any. |
|
inline |
|
inline |
|
inline |
|
inline |
|
inline |
Indicator to seek relative to start of file.
|
inline |
Indicator to seek relative to current file position.
|
inline |
Indicator to seek relative to end of file.
|
inline |
|
inline |
Test if the stream is at end of file.
file | File (FILE* encoded as uint64). |
|
inline |
Clear end of file indicator.
file | File (FILE* encoded as uint64). |
void SPL::Functions::File::fstat | ( | const SPL::rstring & | file, |
const SPL::rstring & | what, | ||
SPL::uint64 & | result, | ||
SPL::int32 & | err | ||
) |
Return information about a file.
file | File name. This must be a fully qualified name. You may use builtin functions like dataDirectory to construct the fully qualified name. |
what | Desired information: one of dev/rdev/ino/mode/nlink/uid/gid/size/blksize/blocks. |
result | Returned information. |
err | Set to 0 on success, errno value on failure (set to EINVAL if what string is not valid). |
|
inline |
Return information about a file.
file | File name. This must be a fully qualified name. You may use builtin functions like dataDirectory to construct the fully qualified name. |
what | Desired information: one of dev/rdev/ino/mode/nlink/uid/gid/size/blksize/blocks. |
result | Returned information. |
err | Set to 0 on success, errno value on failure (set to EINVAL if what string is not valid). |
void SPL::Functions::File::fstat | ( | const SPL::rstring & | file, |
const SPL::rstring & | what, | ||
SPL::timestamp & | result, | ||
SPL::int32 & | err | ||
) |
Return timestamp information about a file.
file | File name. This must be a fully qualified name. You may use builtin functions like dataDirectory to construct the fully qualified name. |
what | Desired information: one of atime/mtime/ctime. |
result | Returned information. |
err | Set to 0 on success, errno value on failure (set to EINVAL if what string is not valid). |
|
inline |
Return timestamp information about a file.
file | File name. This must be a fully qualified name. You may use builtin functions like dataDirectory to construct the fully qualified name. |
what | Desired information: one of atime/mtime/ctime. |
result | Returned information. |
err | Set to 0 on success, errno value on failure (set to EINVAL if what string is not valid). |
void SPL::Functions::File::fstat | ( | const SPL::uint64 | file, |
const SPL::rstring & | what, | ||
SPL::uint64 & | result, | ||
SPL::int32 & | err | ||
) |
|
inline |
void SPL::Functions::File::fstat | ( | const SPL::uint64 | file, |
const SPL::rstring & | what, | ||
SPL::timestamp & | result, | ||
SPL::int32 & | err | ||
) |
|
inline |
void SPL::Functions::File::fwriteString | ( | const char * | val, |
SPL::uint64 | len, | ||
const SPL::uint64 | file, | ||
SPL::int32 & | err | ||
) |
|
inline |
|
inline |
|
inline |
void SPL::Functions::File::fwriteTxt | ( | const SPL::ConstValueHandle & | val, |
const SPL::uint64 | file, | ||
SPL::int32 & | err | ||
) |
void SPL::Functions::File::fwriteBin | ( | const SPL::ConstValueHandle & | val, |
const SPL::uint64 | file, | ||
SPL::int32 & | err | ||
) |
void SPL::Functions::File::fwrite | ( | const SPL::list< SPL::uint8 > & | val, |
const SPL::uint64 | file, | ||
const SPL::uint64 | loffset, | ||
const SPL::uint64 | length, | ||
SPL::int32 & | err | ||
) |
SPL::rstring SPL::Functions::File::freadToken | ( | const SPL::uint64 | file, |
SPL::int32 & | err | ||
) |
Read a 'token' from a file. A token is a series of non-whitespace characters. Whitespace is skipped until a non-whitespace character is found, and then all non-whitespace characters in the token are returned.
SPL::rstring SPL::Functions::File::freadLine | ( | const SPL::uint64 | file, |
SPL::int32 & | err | ||
) |
|
inline |
|
inline |
SPL::uint64 SPL::Functions::File::fread | ( | SPL::list< SPL::uint8 > & | res, |
const SPL::uint64 | file, | ||
const SPL::uint64 | length, | ||
SPL::int32 & | err | ||
) |
void SPL::Functions::File::freadfile | ( | SPL::blob & | res, |
const SPL::uint64 | file, | ||
SPL::int32 & | err | ||
) |
void SPL::Functions::File::fwriteblob | ( | const SPL::blob & | b, |
const SPL::uint64 | file, | ||
SPL::int32 & | err | ||
) |
|
inline |
Return whether the value is EOF.
v | Value. |
|
inline |
Return whether the value is EACCES.
v | Value. |
|
inline |
Return whether the value is EAGAIN.
v | Value. |
|
inline |
Return whether the value is EBADF.
v | Value. |
|
inline |
Return whether the value is EFAULT.
v | Value. |
|
inline |
Return whether the value is EFBIG.
v | Value. |
|
inline |
Return whether the value is EINTR.
v | Value. |
|
inline |
Return whether the value is EINVAL.
v | Value. |
|
inline |
Return whether the value is EIO.
v | Value. |
|
inline |
Return whether the value is EISDIR.
v | Value. |
|
inline |
Return whether the value is EMFILE.
v | Value. |
|
inline |
Return whether the value is ENFILE.
v | Value. |
|
inline |
Return whether the value is ELOOP.
v | Value. |
|
inline |
Return whether the value is ENAMETOOLONG.
v | Value. |
|
inline |
Return whether the value is ENODEV.
v | Value. |
|
inline |
Return whether the value is ENOENT.
v | Value. |
|
inline |
Return whether the value is ENOMEM.
v | Value. |
|
inline |
Return whether the value is ENOSPC.
v | Value. |
|
inline |
Return whether the value is ENOTDIR.
v | Value. |
|
inline |
Return whether the value is ENXIO.
v | Value. |
|
inline |
Return whether the value is EOVERFLOW.
v | Value. |
|
inline |
Return whether the value is EPIPE.
v | Value. |
|
inline |
Return whether the value is EPERM.
v | Value. |
|
inline |
Return whether the value is EROFS.
v | Value. |
|
inline |
Return whether the value is ESPIPE.
v | Value. |
|
inline |
Return whether the value is ETXTBSY.
v | Value. |
|
inline |
Return whether the value is EWOULDBLOCK.
v | Value. |