dirty solution:
...
It took me a minute to find out this won't work. Shall I say why or shall I leave it as a riddle?
Someone was looking for solution in .NET. http://stackoverflow.com/questions/430256/how-do-i-determine-whether-the-filesystem-is-case-sensitive-in-net
Thanks, here is the solution for Windows:
function GetFolderFS(Folder: String): String;
var
Drive: String;
fileSystemName, volumeName: array[0..99] of char;
fileSystemFlags, serialNo, maxFilenameLength: DWORD;
begin
Drive:= Copy(Folder,1,3);
ShowMessage(Drive);
if DirectoryExistsUTF8(Drive) then
begin
GetVolumeInformation(PChar(Drive), volumeName, SizeOf(volumeName), @serialNo, maxFilenameLength, fileSystemFlags, fileSystemName, SizeOf(fileSystemName));
Result:=fileSystemName;
end
else
Result:='NODEV';
end;
But, could s.o. check what will this function return on a EXT drive, mounted on Windows. My linux is on a Loop drive, so I could not mount it. I formatted a SD card to EXT4, but
ext2fsd could not mount it.
There are also some border cases, like using NTFS on both Windows and Linux. It is a case sensitive FS, but Windows ignores filename case; OTOH, Linux can as usual create and read files on a NTFS volume which differ only in case...
Unfortunately you are right. And because it is documented, this irresponsible implementation of NTFS support under Linux is not a bug, but a feature. So when s.o. develops an app, this one should take care to prevent creation of multiple files with the same name. I tried it, all other files just disappear when saving the only accessible file in Windows.
For Linux I suppose I could simply use
mount and parse the output.
Similar for Mac OS-
diskutil should do.
Android should be a problem- some dependencies of
mount are not installed by default, according to
this.
Does Lazarus run on some other OSes?