BufferedFiles Documentation
BufferedFiles
The main focus on this module is on bufferedopen
, which wraps a file in a buffered filehandle (that is a subtype of julias own IO
type).
BufferedFiles.BufferedFiles
— Module.BufferedFiles
BufferedFiles.read_new
— Method.Read in new Bytes
Libc
Base.Libc
— Module.Interface to libc, the C standard library.
Base.Libc.TmStruct
— Type.TmStruct([seconds])
Convert a number of seconds since the epoch to broken-down format, with fields sec
, min
, hour
, mday
, month
, year
, wday
, yday
, and isdst
.
Base.Libc.calloc
— Method.calloc(num::Integer, size::Integer) -> Ptr{Cvoid}
Call calloc
from the C standard library.
Base.Libc.errno
— Method.errno([code])
Get the value of the C library's errno
. If an argument is specified, it is used to set the value of errno
.
The value of errno
is only valid immediately after a ccall
to a C library routine that sets it. Specifically, you cannot call errno
at the next prompt in a REPL, because lots of code is executed between prompts.
Base.Libc.flush_cstdio
— Method.flush_cstdio()
Flushes the C stdout
and stderr
streams (which may have been written to by external C code).
Base.Libc.free
— Method.free(addr::Ptr)
Call free
from the C standard library. Only use this on memory obtained from malloc
, not on pointers retrieved from other C libraries. Ptr
objects obtained from C libraries should be freed by the free functions defined in that library, to avoid assertion failures if multiple libc
libraries exist on the system.
Base.Libc.gethostname
— Method.gethostname() -> AbstractString
Get the local machine's host name.
Base.Libc.getpid
— Method.getpid() -> Int32
Get Julia's process ID.
Base.Libc.malloc
— Method.malloc(size::Integer) -> Ptr{Cvoid}
Call malloc
from the C standard library.
Base.Libc.realloc
— Method.Base.Libc.strerror
— Method.strerror(n=errno())
Convert a system call error code to a descriptive string
Base.Libc.strftime
— Method.strftime([format], time)
Convert time, given as a number of seconds since the epoch or a TmStruct
, to a formatted string using the given format. Supported formats are the same as those in the standard C library.
Base.Libc.strptime
— Method.strptime([format], timestr)
Parse a formatted time string into a TmStruct
giving the seconds, minute, hour, date, etc. Supported formats are the same as those in the standard C library. On some platforms, timezones will not be parsed correctly. If the result of this function will be passed to time
to convert it to seconds since the epoch, the isdst
field should be filled in manually. Setting it to -1
will tell the C library to use the current system settings to determine the timezone.
Base.Libc.systemsleep
— Function.systemsleep(s::Real)
Suspends execution for s
seconds. This function does not yield to Julia's scheduler and therefore blocks the Julia thread that it is running on for the duration of the sleep time.
See also: sleep
Base.Libc.time
— Method.time(t::TmStruct)
Converts a TmStruct
struct to a number of seconds since the epoch.
Base.Libc.time
— Method.time()
Get the system time in seconds since the epoch, with fairly high (typically, microsecond) resolution.
Base.Libc.RawFD
— Type.RawFD
Primitive type which wraps the native OS file descriptor. RawFD
s can be passed to methods like stat
to discover information about the underlying file, and can also be used to open streams, with the RawFD
describing the OS file backing the stream.
Base.Libc.FormatMessage
— Function.FormatMessage(n=GetLastError())
Convert a Win32 system call error code to a descriptive string [only available on Windows].
Base.Libc.GetLastError
— Function.GetLastError()
Call the Win32 GetLastError
function [only available on Windows].
Base.Libc.rand
— Method.rand([T::Type])
Interface to the C rand()
function. If T
is provided, generate a value of type T
by composing two calls to rand()
. T
can be UInt32
or Float64
.
Base.Libc.srand
— Function.srand([seed])
Interface to the C srand(seed)
function.