Sorry for a such long delay with reply, got buried under the other stuff and mislooked your reply.
Now got back to the issue, and here is what I'm experiencing:
- got 10-byte long file. WIth some text ('hello here').
- doing echo "17" >> ...filepath
- getting the same 10-byte long file, with text '17' at the beginning, and LF symbol after it. The rest of file is unchanged.
So it is not something expected, however no any 'append' flags mentioned and offset in writeFileAtPath: is zero.
My log of FUSE calls follows (I'm using Objective-C API):
[41495] 2015-11-24 18:39:40 +0000 : FuseFileSystem: attributesOfItemAtPath:/Nickolay TestUpload/1.txt userData: (null)
[41495] 2015-11-24 18:39:40 +0000 : Returning attributes : {
NSFileCreationDate = "2015-11-13 16:17:22 +0000";
NSFileExtensionHidden = 0;
NSFileGroupOwnerAccountID = 20;
NSFileGroupOwnerAccountName = staff;
NSFileModificationDate = "2015-11-24 18:37:56 +0000";
NSFileOwnerAccountName = nickolay;
NSFilePosixPermissions = 384;
NSFileSize = 10;
NSFileSystemNumber = 16777220;
NSFileType = NSFileTypeRegular;
kGMUserFileSystemFileAccessDateKey = "2015-11-13 16:17:22 +0000";
}
[44035] 2015-11-24 18:39:40 +0000 : FuseFileSystem: openFileAtPath:/Nickolay TestUpload/1.txt mode:O_WRONLY (1)
[40735] 2015-11-24 18:39:40 +0000 : FuseFileSystem: writeFileAtPath:/Nickolay TestUpload/1.txt userData:<FuseFileData: 0x600000030580> size:3 offset:0
[44035] 2015-11-24 18:39:40 +0000 : FuseFileSystem: releaseFileAtPath:/Nickolay TestUpload/1.txt : userData released.
[40735] 2015-11-24 18:39:40 +0000 : FuseFileSystem: attributesOfItemAtPath:/Nickolay TestUpload/1.txt userData: (null)
[40735] 2015-11-24 18:39:40 +0000 : Returning attributes : {
NSFileCreationDate = "2015-11-13 16:17:22 +0000";
NSFileExtensionHidden = 0;
NSFileGroupOwnerAccountID = 20;
NSFileGroupOwnerAccountName = staff;
NSFileModificationDate = "2015-11-24 18:39:40 +0000";
NSFileOwnerAccountName = nickolay;
NSFilePosixPermissions = 384;
NSFileSize = 10;
NSFileSystemNumber = 16777220;
NSFileType = NSFileTypeRegular;
kGMUserFileSystemFileAccessDateKey = "2015-11-13 16:17:22 +0000";
}
--
Nickolay Olshevsky