Commit Graph

18 Commits

Author SHA1 Message Date
Michael Hirsch, Ph.D 2bbd57092f add FeatureNew 2020-02-06 12:54:38 -05:00
Michael Hirsch, Ph.D 5bbeab8ed4 add fs.stem() 2020-02-06 12:54:38 -05:00
Michael Hirsch, Ph.D dcb7043403 fs: add expanduser method
this should help users specify leading `~` in various Meson options and variables
without refactoring lots of places inside Meson itself.
2020-02-06 12:54:38 -05:00
Michael Hirsch, Ph.D 4556343d95 fs: add methods as_posix, is_absolute
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
2020-02-06 12:54:38 -05:00
Daniel Mensinger 09b53c534f types: import typing as T (fixes #6333) 2020-01-08 15:28:17 +01:00
Michael Hirsch, Ph.D fb121f6254 fs: rename samefile => is_samepath
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-12-19 08:51:31 -05:00
Michael Brockus 7d162487e3 Add raise at the start of MesonException 2019-12-04 10:54:24 +02:00
Xavier Claessens a6f7a1d8c4 fs: Add parent() and name() methods 2019-11-25 14:55:19 -05:00
Michael Hirsch, Ph.D 0cb48cdc79
fs: make replace_suffix not expand file to absolute path, just manipulate the string 2019-11-17 00:22:53 -05:00
Michael Hirsch, Ph.D 2ae96f8595
fs: replace_suffix 2019-11-17 00:17:06 -05:00
Michael Hirsch, Ph.D a320274179
fs: get file size
fs: add samefile
2019-11-17 00:17:04 -05:00
Michael Hirsch, Ph.D 67651271f6
fs: add hash compute method 2019-11-17 00:17:04 -05:00
Michael Hirsch, Ph.D 052d918908
add fs.with_suffix 2019-11-17 00:17:02 -05:00
Michael Hirsch, Ph.D dc8e8f0644
fs: improve exception feedback 2019-11-17 00:17:02 -05:00
Michael Hirsch, Ph.D 4adfd921ae
fs: use expanduser 2019-11-17 00:17:01 -05:00
Michael Hirsch, Ph.D 9fc76b0323
fs: deduplicate functions 2019-11-17 00:17:01 -05:00
Michael Hirsch, Ph.D 3bbd065576
fs: use pathlib.Path, add type hint check 2019-11-17 00:17:00 -05:00
Jussi Pakkanen 46788d1b5b Created the filesystem module. 2019-11-08 00:44:45 +02:00