Commit Graph

18 Commits

Author SHA1 Message Date
Andreas Kling
56eaf9b033 AK: Make FileSystemPath better at handling relative paths
Relative paths now canonicalize into a string starting with "./"
Previously, "foo" would be canonicalized as "/foo" which was clearly
not right.
2019-08-23 19:58:16 +02:00
rhin123
a175e76948 TextEditor: Include extension during SaveAs
When we save-as in the text editor we now auto-populate GFilePicker /w
the current name & extension.
2019-07-29 20:46:31 +02:00
Andreas Kling
954a0b8efe AK: Add a canonicalized_path() convenience function.
This is the same as calling FileSystemPath(foo).string(). The majority of
clients only care about canonicalizing a path, so let's have an easy way
to express that.
2019-07-15 06:50:32 +02:00
Robin Burchell
7bce096afd Take StringView in more places
We should work towards a pattern where we take StringView as function
arguments, and store String as member, to push the String construction
to the last possible moment.
2019-06-02 12:55:51 +02:00
Robin Burchell
0dc9af5f7e Add clang-format file
Also run it across the whole tree to get everything using the One True Style.
We don't yet run this in an automated fashion as it's a little slow, but
there is a snippet to do so in makeall.sh.
2019-05-28 17:31:20 +02:00
Andreas Kling
5ba2dba392 FileSystemPath: Add a has_extension() helper.
This code:

    if (path.string().to_lowercase().ends_with(".foo"))

Can now be written as:

    if (path.has_extension(".foo"))
2019-05-27 01:53:42 +02:00
Andreas Kling
2c6a597d77 FileManager: Make the tree view follow the directory view navigations. 2019-03-30 03:27:25 +01:00
Andreas Kling
ffab6897aa Big, possibly complete sweep of naming changes. 2019-01-31 17:31:23 +01:00
Andreas Kling
b75ee4aacb Coding style fixes in AK. 2019-01-19 22:53:05 +01:00
Andreas Kling
9d7da26b4e StringBuilder: Use a ByteBuffer internally instead of a Vector<String>. 2019-01-18 03:27:51 +01:00
Andreas Kling
7bc41532be Remove FS::read_entire_inode() in favor of Inode::read_entire(). 2018-12-21 17:45:42 +01:00
Andreas Kling
ec1c487dcd Yet another pass of style fixes. 2018-12-21 02:10:45 +01:00
Andreas Kling
aff89d2fd7 Yet more coding style fixes. 2018-12-03 01:38:22 +01:00
Andreas Kling
f5a0b6961c Fix mkdir with relative paths. 2018-11-18 23:28:43 +01:00
Andreas Kling
de4604ac95 Finally hook up the mkdir code to a syscall.
Added a /bin/mkdir that makes directories. How very neat :^)
There are various limitations because of missing functionality.
2018-11-18 15:02:16 +01:00
Andreas Kling
c653bb09b3 Don't include empty segments in canonicalized paths.
This makes "/foo/" and "/foo" both resolve to "/foo".
2018-11-10 15:46:39 +01:00
Andreas Kling
e9cdb6bb9b Fix all current build warnings in LibC. 2018-11-09 10:09:46 +01:00
Andreas Kling
88ad59bfb1 Add a simple FileSystemPath class that can canonicalize paths.
Also a simple StringBuilder to help him out.
2018-10-28 08:54:20 +01:00