public ResultBean updateFolder(int driveId, string pathToDrive) { if (LocalFileManager.CreateDir(combineDrivePath(driveId, pathToDrive))) { return(ResultBean.Success()); } return(ResultBean.Error("创建失败")); }
public int SaveNewDrive(string driveName, int userId) { Drive newDrive = new Drive { name = driveName, creator_id = userId }; int id; using (var context = new CustomZfileDbContext()) { var result = context.drive.Add(newDrive); context.SaveChanges(); id = result.Entity.id; } LocalFileManager.CreateDir(BasePath + "/" + id.ToString()); return(id); }