+ public OCShare(ShareRemoteFile remoteFile) {
+ mId = -1;
+
+ String path = remoteFile.getPath();
+ if (path == null || path.length() <= 0 || !path.startsWith(OCFile.PATH_SEPARATOR)) {
+ Log_OC.e(TAG, "Trying to create a OCShare with a non valid path");
+ throw new IllegalArgumentException("Trying to create a OCShare with a non valid path: " + path);
+ }
+ mPath = path;
+
+ mFileSource = remoteFile.getFileSource();
+ mItemSource = remoteFile.getItemSource();
+ mShareType = remoteFile.getShareType();
+ mShareWith = remoteFile.getShareWith();
+ mPermissions = remoteFile.getPermissions();
+ mSharedDate = remoteFile.getSharedDate();
+ mExpirationDate = remoteFile.getExpirationDate();
+ mToken = remoteFile.getToken();
+ mSharedWithDisplayName = remoteFile.getSharedWithDisplayName();
+ mIsDirectory = remoteFile.isDirectory();
+ mUserId = remoteFile.getUserId();
+ mIdRemoteShared = remoteFile.getIdRemoteShared();
+ }
+