class::fs::NullFile

class fs::NullFile
  : public fs::File

Summary

[NullFile](#classfs_1_1_null_file_1af1ebd435bbead8556364d2db533c4366)()

int close()

OpenFlags & flags()

const OpenFlags & flags() const

int ioctl(

const arg::IoRequest request,
const arg::IoArgument argument
) const

int open(

const var::ConstString & name,
const OpenFlags & flags
)

int read(

arg::DestinationBuffer buf,
const arg::Size nbyte
) const

int read()

int read()

int read()

int read()

int read()

int read()

int seek(

const arg::Location location,
enum whence whence
) const

u32 size() const

int write(

const arg::SourceBuffer buf,
const arg::Size nbyte
) const

int write()

int write()

int write()

int write()

int write()

int write()

int write()

int write()

int write()

int write()

int write()

int write()

int write()

Members

NullFile()

Constructs a null file.


int close()

Reimplements fs::File::close() to have no functionality.


OpenFlags & flags()

const OpenFlags & flags() const

int ioctl(

const arg::IoRequest request,
const arg::IoArgument argument
) const

Reimplements fs::File::ioctl() to have no functionality.


int open(

const var::ConstString & name,
const OpenFlags & flags
)

Reimplements fs::File::open() to have no functionality.


int read(

arg::DestinationBuffer buf,
const arg::Size nbyte
) const

Reimplements fs::File::read() to simply return -1 if a read is attempted.

Parameters

  • buf dest data pointer

  • nbyte number of bytes to read

Returns

-1 to indicate reads are not valid


int read()

int read()

Reads the file.

Parameters

  • buf A pointer to the destination buffer

  • nbyte The number of bytes to read

Returns

The number of bytes read or less than zero on an error


int read()

Reads the file into a var::Data object.

Parameters

  • data The destination data object

Returns

The number of bytes read

This method will read up to data.size() bytes.


int read()

Reads the file.

Parameters

  • loc The location of the file to read

  • buf A pointer to the destination buffer

  • nbyte The number of bytes to read

Returns

The number of bytes read or less than zero on an error


int read()

Reads the file using a var::Data object.


int read()

int seek(

const arg::Location location,
enum whence whence
) const

Returns an error.

Parameters

  • loc The location to seek to

  • whence The location to seek from (e.g. fs::File::SET)

Returns

-1 because seeking is not valid


u32 size() const

Returns zero.


int write(

const arg::SourceBuffer buf,
const arg::Size nbyte
) const

Reimplements fs::File::write() to simply to accept the data but it is not stored anywhere.

Parameters

  • buf source data pointer

  • nbyte number of bytes to write

Returns

The number of bytes successfully written


int write()

int write()

int write()

Writes the file at the location specified.

Parameters

  • loc Location to write (not application to character devices)

  • buf Pointer to the source data

  • nbyte Number of bytes to write

Returns

Number of bytes successfully written or less than zero with errno set


int write()

int write()

int write()

int write()

Writes the file using a var::ConstString object at the location specified.


int write()

Writes a var::ConstString to the file.

Parameters

  • str The string to write

Returns

The number of bytes written


int write()

Writes the file using a var::Data object.


int write()

Writes the file using a var::String object at the location specified.


int write()

Writes the file using a var::Data object at the location specified.


int write()

Write the file.

Parameters

  • buf A pointer to the source buffer

  • nbyte The number of bytes to read

Returns

The number of bytes written or less than zero on an error


int write()

Writes a var::String to the file.

Parameters

  • str The string to write

Returns

The number of bytes written


X

Thanks for Coming!

Subscribe to news and updates