Age | Commit message (Collapse) | Author |
|
Instead of writing until we run out of space, just fail immediately.
|
|
This is a huge speed-up (3x) when copying large files. Ideally this
would be optimized by the kernel somehow, but we're not there yet.
|
|
Since we usually know how many bytes we're going to write, we can be
nice to the kernel and ftruncate() the destination to the expected size
up front, reducing the amount of FS churn.
|
|
Recursive copying is only allowed if cp is called with the -r switch, ala POSIX.
|
|
|
|
|
|
This was a workaround to be able to build on case-insensitive file
systems where it might get confused about <string.h> vs <String.h>.
Let's just not support building that way, so String.h can have an
objectively nicer name. :^)
|
|
|
|
- Use this to implement the O_TRUNC open flag.
- Fix creat() to pass O_CREAT | O_TRUNC | O_WRONLY.
- Make sure we truncate wherever appropriate.
|
|
When passing O_CREAT to open(), it will grab a third "mode" argument from
the stack. Let's not forget to actually pass this!
Also use the process umask for the created files.
|
|
|
|
Don't overwrite the literal directory inode contents when copying a file
to a directory, duh. :^)
|
|
/bin/cp will now copy the permission bits from source to destination. :^)
|
|
|
|
|