diff --git a/native/Linux.cpp b/native/Linux.cpp index eb99262..e650d7b 100644 --- a/native/Linux.cpp +++ b/native/Linux.cpp @@ -135,7 +135,7 @@ namespace { return _displacement; } - tool_return xattr_file::set_mark(ssize_t new_mark) { + tool_return xattr_file::set_mark(ssize_t new_mark) { if (new_mark < 0) return MacOS::paramErr; _displacement = new_mark; return new_mark; @@ -147,7 +147,7 @@ namespace { return eof; } - tool_return xattr_file::set_eof(ssize_t new_eof) { + tool_return xattr_file::set_eof(ssize_t new_eof) { if (_readonly) return MacOS::wrPermErr; @@ -166,6 +166,17 @@ namespace { } + + uint32_t rforksize(const std::string &path_name) + { + + ssize_t ok = getxattr(path_name.c_str(), XATTR_RESOURCEFORK_NAME, NULL, 0); + if (ok < 0) ok = 0; + return ok; + } + + + } namespace native { @@ -241,5 +252,4 @@ namespace native { } - } \ No newline at end of file