![]() |
Nix 2.36.0
Nix, the purely functional package manager; unstable internal interfaces
|
#include "nix/util/source-path.hh"#include "nix/util/os-string.hh"#include "nix/util/file-descriptor.hh"#include "nix/util/file-system.hh"Go to the source code of this file.
Functions | |
| std::tuple< OsStrings, AutoCloseFD, AutoDelete > | nix::editorFor (const SourcePath &file, uint32_t line, bool readOnly) |
| std::tuple< OsStrings, AutoCloseFD, AutoDelete > nix::editorFor | ( | const SourcePath & | file, |
| uint32_t | line, | ||
| bool | readOnly = true ) |
Helper function to generate args that invoke $EDITOR on filename:lineno.
When file doesn't have a physical path, the contents get copied into a temporary file, and a file descriptor and RAII cleanup guard for it are returned.
| readOnly | make the temporary file readonly if the file has no physical path. Ignored otherwise. |