Is the file system case sensitive?

isFileSystemCaseSensitive(dir = ".")

Arguments

dir

character(1). Directory path.

Value

TRUE on success; FALSE on failure, with cause set.

Details

Linux partitions in general are case sensitive by default. macOS APFS and HFS partitions still default to case insensitive. Windows partitions default to case insensitive.

This function checks for case sensitivity internally by creating (touching) two invisible files with names that only differ by case. If 2 files are detected, the file system is case sensitive.

Note

Updated 2019-10-21.

See also

_koopa_is_file_system_case_sensitive shell function in koopa.

Examples

isFileSystemCaseSensitive()
#> [1] TRUE