summaryrefslogtreecommitdiff
path: root/docs/markdown/Fs-module.md
AgeCommit message (Collapse)Author
2023-08-18Revert "Revert "Add fs.relative_to()""Tristan Partin
This reverts commit 84c8905d527893bedc673e8a036b8b2ec89368b4. Fixed the cygwin failure...
2023-08-17Revert "Add fs.relative_to()"Eli Schwartz
This reverts commit f52bcaa27fc125ab9ae583af466ba99c164169f3. It did not pass CI, and was merged anyway because there were two CI errors in the same cygwin job. The other error was not the fault of this commit, and since cygwin errors were glossed over because they were "expected", the presence of a new error *added* by this commit was overlooked. Per the meson development policy, PRs which result in CI errors can/should be reverted at will, no questions asked.
2023-08-17fix style errors in fs.relative_to implementationEli Schwartz
In commit f52bcaa27fc125ab9ae583af466ba99c164169f3 a few issues were added: - doc typo - imports for utils.universal are not intended to be directly used, it's an internal wrapper that exists solely to make mesonlib work well as it always did while simultaneously allowing `meson --internal` codepaths to avoid importing anything other than an extremely stripped down core - type annotation specific import was imported at runtime scope
2023-08-17Add fs.relative_to()Tristan Partin
Returns a relative path from arg 2 to arg 1 similar to os.path.relpath().
2023-07-13Add import instructions for filesystem moduleMiroPalmu
2023-04-11fix various spelling issuesJosh Soref
Signed-off-by: Josh Soref <2119212+jsoref@users.noreply.github.com>
2023-03-28docs: replace most uses of `meson_options.txt` with `meson.options`Dylan Baker
I've left the old release notes in place, but updated everything else to use `meson.options`
2022-08-18modules/fs: Replace configure_file(copy:) with fs.copyfileDylan Baker
`configure_file` is both an extremely complicated implementation, and a strange place for copying. It's a bit of a historical artifact, since the fs module didn't yet exist. It makes more sense to move this to the fs module and deprecate this `configure_file` version. This new version works at build time rather than configure time, which has the disadvantage it can't be passed to `run_command`, but with the advantage that changes to the input don't require a full reconfigure.
2021-06-08document the enhancement to the Fs module permitting File argumentsEli Schwartz
Add a release notes snippet too!
2021-02-04Introduce `fs.read` to read a file as a stringLuke Drummond
Following #7890, this patch introduces the ability to read the contents of a file to the fs module. This patch introduces the ability to read files at configure time, but has some restrictions: - binary files are not supported (I don't think this will prove a problem, and if people are wanting to do something with binary files, they should probably be shelling out to their own script). - Only files outside the build directory allowed. This limitation should prevent build loops. Given that reading an arbitrary file at configure time can affect the configuration in almost arbitrary ways, meson should force a reconfigure when the given file changes. This is non-configurable, but this can easily be changed with a future keyword argument.
2021-01-30Rewrap long text lines in docs. [skip ci]Jussi Pakkanen
2021-01-13Fix misspellsAntonin Décimo
Signed-off-by: Antonin Décimo <antonin.decimo@gmail.com>
2020-02-06add FeatureNewMichael Hirsch, Ph.D
2020-02-06add fs.stem()Michael Hirsch, Ph.D
2020-02-06doc: filesystem moduleMichael Hirsch, Ph.D
2020-02-06fs: add expanduser methodMichael Hirsch, Ph.D
this should help users specify leading `~` in various Meson options and variables without refactoring lots of places inside Meson itself.
2020-02-06fs: add methods as_posix, is_absoluteMichael Hirsch, Ph.D
fs: make exception specify method name fs: actually raise exceptions fs: resolve path e.g. /opt/foo/.. => /opt/foo fs: correct behavior of is_symlink
2019-12-19fs: rename samefile => is_samepathMichael Hirsch, Ph.D
is_samepath better reflects the nature of this function--that files and directories can be compared. Also, instead of raising exceptions, simply return False when one or both .is_samepath(path1, path1) don't exist. This is more intuitive behavior and avoids having an extra if fs.exist() to go with every fs.is_samepath()
2019-11-25fs: Add parent() and name() methodsXavier Claessens
2019-11-17fs: make replace_suffix not expand file to absolute path, just manipulate ↵Michael Hirsch, Ph.D
the string
2019-11-17fs: replace_suffixMichael Hirsch, Ph.D
2019-11-17fs: add docs for fs.size()Michael Hirsch, Ph.D
2019-11-17fs: correct docsMichael Hirsch, Ph.D
2019-11-17fs: get file sizeMichael Hirsch, Ph.D
fs: add samefile
2019-11-17fs: add hash compute methodMichael Hirsch, Ph.D
2019-11-17fs: further document and test behaviorMichael Hirsch, Ph.D
2019-11-17add fs.with_suffixMichael Hirsch, Ph.D
2019-11-08Created the filesystem module.Jussi Pakkanen