(parentID uint64, name string, mode, uid, gid uint32, target []byte, fullPath string, ignoreExist bool)
| 111 | } |
| 112 | |
| 113 | func (mw *MetaWrapper) Create_ll(parentID uint64, name string, mode, uid, gid uint32, target []byte, fullPath string, ignoreExist bool) (*proto.InodeInfo, error) { |
| 114 | // if mw.EnableTransaction { |
| 115 | var txMask proto.TxOpMask |
| 116 | if proto.IsRegular(mode) { |
| 117 | txMask = proto.TxOpMaskCreate |
| 118 | } else if proto.IsDir(mode) { |
| 119 | txMask = proto.TxOpMaskMkdir |
| 120 | } else if proto.IsSymlink(mode) { |
| 121 | txMask = proto.TxOpMaskSymlink |
| 122 | } else { |
| 123 | txMask = proto.TxOpMaskMknod |
| 124 | } |
| 125 | txType := proto.TxMaskToType(txMask) |
| 126 | if mw.enableTx(txMask) && txType != proto.TxTypeUndefined { |
| 127 | return mw.txCreate_ll(parentID, name, mode, uid, gid, target, txType, fullPath, ignoreExist) |
| 128 | } else { |
| 129 | return mw.create_ll(parentID, name, mode, uid, gid, target, fullPath, ignoreExist) |
| 130 | } |
| 131 | } |
| 132 | |
| 133 | func (mw *MetaWrapper) txCreate_ll(parentID uint64, name string, mode, uid, gid uint32, target []byte, txType uint32, |
| 134 | fullPath string, ignoreExist bool, |
no test coverage detected