Skip to content

Commit

Permalink
Path: fix typo and add max length info
Browse files Browse the repository at this point in the history
Reviewed By: jdelliot

Differential Revision: D65827712

fbshipit-source-id: dca8906258b82ebab6a5784b4799b50118e7c42a
  • Loading branch information
MichaelCuevas authored and facebook-github-bot committed Nov 13, 2024
1 parent d148c22 commit d8f110f
Showing 1 changed file with 24 additions and 1 deletion.
25 changes: 24 additions & 1 deletion eden/fs/docs/Paths.md
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ is stored or non-stored (`Piece`).
### `AbsolutePath`/`AbsolutePathPiece`

- Must begin with a "/" or "\\?\" on Windows
- On Windows, the path separator is always a "\"
- On Windows, the path separator is always a "\\"
- May be composed with `PathComponent`s and `RelativePath`s
- May not be composed with other `AbsolutePath`s

Expand Down Expand Up @@ -135,3 +135,26 @@ stored path is small enough that the SSO kicks-in.
- `removeRecursively()` - Recursively removes a directory tree. Returns false if
the directory did not exist in the first place, and true if the directory was
successfully removed. Throws an exception on error.

# Length Limitations

- Each PathComponent is limited to 255 characters. This restriction is
self-imposed in an attempt to maintain compatability with other filesystems.
- The total path length is not enforced by EdenFS, but operating systems on
which EdenFS runs may impose their own limits. As of November 2024, the
following limits are known.
- Linux: Paths must be less than 4096 characters
- Check `getconf NAME_MAX $PATH` to check the path component limits for a
given filesystem
- Check `getconf PATH_MAX $PATH` to check the total path length limits for a
given filesystem
- macOS: Paths must be under 1024 characters
- Use the same commands as described above for Linux to check max path
lengths on macOS
- Windows:
[There are 2 different limits](https://learn.microsoft.com/en-us/windows/win32/fileio/maximum-file-path-limitation?tabs=registry)
- Regular paths must be less than 260 characters total
- UNC paths are allowed to be much longer: 32,767 total characters
- NOTE: Mononoke (the source control server component) enforces its own max path
length restrictions. As of November 2024, the max path length that Mononoke
allows is 980 characters.

0 comments on commit d8f110f

Please sign in to comment.