FileResourceHandle¶
- class lsst.resources._resourceHandles._fileResourceHandle.FileResourceHandle(mode: str, log: logging.Logger, uri: ResourcePath, *, encoding: str | None, newline: str = '\n')¶
Bases:
BaseResourceHandle[U]File based specialization of
BaseResourceHandle.- Parameters:
- mode
str Handle modes as described in the python
iomodule.- log
Logger Logger to used when writing messages.
- uri
lsst.resources.ResourcePath URI of the file on the filesystem to use.
- encoding
stror None Optionally supply the encoding of the file.
- newline
str When doing multiline operations, break the stream on given character. Defaults to newline. If a file is opened in binary mode, this argument is not used, as binary files will only split lines on the binary newline representation.
- mode
Notes
Documentation on the methods of this class line should refer to the corresponding methods in the
iomodule.Attributes Summary
Methods Summary
close()fileno()flush()read([size])readable()readline([size])readlines([hint])seek(offset[, whence])seekable()tell()truncate([size])writable()write(b)writelines(lines)Attributes Documentation
- closed¶
- isatty¶
- mode¶
- name¶
Methods Documentation