FileResourceHandle¶
- class lsst.resources._resourceHandles._fileResourceHandle.FileResourceHandle(mode: str, log: Logger, *, filename: str, encoding: str | None, newline: str = '\n')¶
Bases:
BaseResourceHandle
[U
]File based specialization of
BaseResourceHandle
- Parameters:
- mode
str
Handle modes as described in the python
io
module- log
Logger
Logger to used when writing messages
- filename
str
Name of the file on the filesystem to use.
- encoding
str
or 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
io
module.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¶
Methods Documentation