DTEDITORSETCONTENTSFROMFILE(3)
π DtEditorSetContentsFromFile(3) π
okay so bestie, this page is from the library call manual section β manual name nestled in near the top, no crusty repeated header line. It's all about DtEditorSetContentsFromFile, and it is literally giving "load a file straight into a DtEditor widget." β¨
πΈ NAME πΈ
DtEditorSetContentsFromFile β load data from a file into a DtEditor widget. π
β¨ SYNOPSIS β¨
#include &<Dt/Editor.h>
DtEditorErrorCode DtEditorSetContentsFromFile(
Widget widget,
char *fileName);
π DESCRIPTION π
The DtEditorSetContentsFromFile function loads the contents of a file into a DtEditor widget. π«Ά
β οΈ bestie, heads up: any data currently in the DtEditor widget is lost. Not hidden, not merged β gone. π
After the data is loaded, the insertion cursor is positioned at the first character. π―
The widget argument specifies the DtEditor widget ID. The fileName argument is the pathname of the file relative to the local system. ποΈ
For a complete definition of the DtEditor widget and its associated resources, see DtEditor(3). π
π RETURN VALUE π
Upon successful completion, the DtEditorSetContentsFromFile function returns one of the following values when it successfully loads the data into the DtEditor widget: π
DtEDITOR_NO_ERRORSβ the file is readable and writable. βDtEDITOR_READ_ONLY_FILEβ the file is read only. πDtEDITOR_NULLS_REMOVEDβ the file contained embeddedNULLcharacters, which were removed. π§Ή
Otherwise, if it cannot load the data into the DtEditor widget, the function returns one of the following values: π
DtEDITOR_NONEXISTENT_FILEβ the file does not exist. π«DtEDITOR_DIRECTORYβ the file is a directory. πDtEDITOR_CHAR_SPECIAL_FILEβ the file is a character-special device. πDtEDITOR_BLOCK_MODE_FILEβ the file is a block-mode device. π§±DtEDITOR_NO_FILE_ACCESSβ the file cannot be accessed. π«DtEDITOR_INSUFFICIENT_MEMORYβ not enough system memory is available to load the file. π§ π₯DtEDITOR_UNREADABLE_FILEβ the file is unreadable for an unspecified reason. β
π¦ APPLICATION USAGE π¦
If the data is in memory, rather than a disk file, the application should use DtEditorSetContents(3). π§
π SEE ALSO π
Dt/Editor.h - DtEditor(5), DtEditor(3), DtEditorAppend(3),
DtEditorAppendFromFile(3), DtEditorGetContents(3), DtEditorInsert(3),
DtEditorInsertFromFile(3), DtEditorReplace(3),
DtEditorReplaceFromFile(3), DtEditorSaveContentsToFile(3),
DtEditorSetContents(3).
that's the whole page, bestie π«Ά β source: library call; version/date: not listed in the original footer, so no fake date energy here. π
π¦ where this page comes from
- nixos 26.05: cde 2.5.3
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash-1017 on : a language model's rewrite of the original, under its terms